html:- i have used ng-repeat to get all images.what should i add to get only single image.
<img class="size" ng-src="{{image.image}}" />
css:- i want to specify the size of image.
.size
{
margin-left:0.3em;
width:11em;
height:11em;
border:0.4em solid #B90504;
}
js:- i have used this code to pull all images from json. how can i get all the details of one image in one view and second image in another view??? where do i have to made changes??Do i need to specify the index number?
$http.get('data/flatfile.json')
.success(function(data, status, headers, config) {
$scope.images = data.items;
});
json:-
{
"items":[
{
"name": "chocolate",
"price": 12.99,
"description": ["string","string"],
"category": "cakes",
"image": "../img/product1.JPG"
},
{
"name": "chocolate",
"price": 12.99,
"description": ["string","string"],
"category": "cakes",
"image": "../img/product2.JPG"
},
{
"name": "chocolate",
"price": 12.99,
"description": ["string","string"],
"category": "cakes",
"image": "../img/product3.JPG"
}
]
}