This is my json. I need to show only the first image in my imageview. i tried with {{p.url}} to get the images. but its not worked fine.
[{
"comment": "",
"adoptId": null,
"images": [
{
"id": 4,
"name": "3_1.jpg",
"url": "Content\\RacePictures\\YRMTH-2017-04-15-HT09.jpg"
},
{
"id": 5,
"name": "3_2.jpg",
"url": "Content\\RacePictures\\YRMTH-2017-04-15-HT09.jpg"
}
]
HTML
<div class="" ng-repeat="d in photos">
<div class="col-md-6" >
<div ng-repeat="p in d.images">
<img ng-src="http://localhost:20513/{{p.url}}" />
</div>
Angular Controller
var httpRequest = $http({
method: 'GET',
url: urls.api + 'Library/treeImages/Filter/' + images,
}) .success(function (data, status) {
$scope.photos = angular.fromJson(data);
}
)
}
<img ng-src="http://localhost:20513/{{d.images[0].url}}" />