I am trying to fetch an image from a json API using angularjs. I am using a html file for fetching the image,but i think i am missing something,it doesn't work. Here's my html:
<li ng-repeat="post in posts">
<a ng-click="clickToOpen({{post.id}})">{{post.title}}</a><p> img src="{{post.attachments.url}}"></p>
</li>
And my JSON:
"attachments": [
{
"id": 15534,
"url": "http://www.grandlakebusinessjournal.com/wp-content/uploads/2013/02/Tera-Mirand-Shores-Platt-Phanse-One2.jpg",
"slug": "tera-mirand-shores-platt-phanse-one-3",
"title": "Tera Mirand Shores Platt Phanse One",
"description": "",
"caption": "",
"parent": 15455,
"mime_type": "image/jpeg",
"images": []
}
]