I am reading a JSON from a file in Angular. The content of the file is:
{
"mango":
[
{
"id": 3,
"image": "Mango1.jpg",
"text": "I am mango 3"
},
{
"id": 2,
"image": "Mango2.jpg",
"text": "I am mango 2"
}
]
}
I am reading it in my controller:
$.getJSON("../json/list.json", function (json) {
$scope.mangoLists = json;
When i output to console, it shows the mango object etc. But I am unable to output them to the UI by doing this:
<div class="col-sm-6" ng-repeat="mango in mangoLists">
{{mango.text}}
</div>
Please assist.