Can anyone help me figure out what I'm doing incorrectly here?
I've fetched some data and passed it to a controller as 'productInfo'.
While I can successfully load the data, I am encountering issues when trying to target specific values within an ng-repeat loop. It seems like I only get the last set of data in the JSON.
The JSON is coming from the server and I can modify the formatting if needed. I'm just getting started with Angular, so I apologize if the solution is simple.
HTML:
<div ng-controller="ProductStandardCtrl">
<p>Item:</p>
<article ng-repeat="item in items">
<img ng-src="{{item.img}}" class="logo" alt="">
<h4>{{item.title}}</h4>
</article>
</div>
JSON:
{
"description":"Lorem Ipsum",
"headline":"Promotion headline",
"items":{
"Standard":
{"img":"http://placehold.it/303x152",
"title":"Standard Product 1"
},
"Standard":
{"img":"http://placehold.it/303x152",
"title":"Standard Product 2"
},
"Standard":
{"img":"http://placehold.it/303x152",
"title":"Standard Product 3"
}
}
}
Thank you!