я получаю мое изображение в веб-службе результат:Как отображать изображение в ионном режиме?
imageJson:'http://localhost:40434/temp-photo/temp8530171778397183509baguette-baguette.jpg '
в моем listEvent.html:
<div ng-repeat="evenement in evenementCategorieData">
<li>
<!-- http://localhost:40434/temp-photo/temp8530171778397183509baguette-baguette.jpg -->
<a class="item item-thumbnail-left" href=""><img ng-if=evenement.imageJson ng-src=http://localhost/temp-photo/{{evenement.imageJson}}>{{evenement.titre_annonce}} {{evenement.texte_annonce}}</a></li>
но я Dispaly этот результат:
Результат моего веб-сервиса:
{
adresse: "denden",
date_evenement: null,
idevenement: 27,
idsouscatego: 12,
iduser: null,
imageJson: "http//localhost40434/temp+photo/temp8530171778397183509baguette+baguettejpg=",
nbr_partici: 25,
prix: null,
texte_annonce: "rrrrrrrrrrrr",
titre_annonce: "Sib 2016"
},
мой код сохранить мое изображение в БД:
facebookExample.controller('MainCtrl', function($scope,$cordovaOauth, $localStorage, $location,$ionicPopup,$state,$http, Camera) {
$scope.getPhoto = function() {
Camera.getPicture().then(function(imageURI) {
console.log(imageURI);
$scope.lastPhoto = imageURI;
console.log("photo");
console.log($scope.lastPhoto);
}, function(err) {
console.err(err);
}, {
quality: 75,
targetWidth: 320,
targetHeight: 320,
saveToPhotoAlbum: false
});
};
после того, как я определил объект для поста:
вар objInsc = новый Object(); objInsc.imageJson = $ scope.lastPhoto;
мой метод пост: $ http.post ('http://@ip:8080/elodieService/evenements/', objInsc) .success (функция (ответ, статус, заголовки, конфигурации) { оповещения ("УСПЕХ ajout Dans La Table Evenement !!");
$http.get('http://@ip/elodieService/evenements/', { params: {fields: "texte_annonce,titre_annonce,adresse,imageJson",format:"json"} }).then(function(result) {
console.log("SUCCESS!"+result.data);
console.log(JSON.stringify(result));
$scope.evenementData = result.data;
});
что я могу сделать?
, так что вы не хотите, чтобы URL был «http: // localhost: 40434/temp-photo/temp8530171778397183509baguette-baguette.jpg», но 'http: // localhost/temp-photo/{{evenement.imageJson}}'? Что вы просите? –