I created a blog post using mongodb(mlab), loopback, and angular 4 and I am able to display my posts on my angular 4 site, however I do not know how to add an image to my loopback model seen here as json:
{
"title": "string",
"author": "string",
"date": "string",// type could be date
"body": "string",
"id": "string"
}
There is no image property type so I am confused as to how to add my image url to my loopback data model in order to display it on my angular 4 blog. I could use <img *ngIf="post.id === '599ce3147e0f7a32c812a6ac'" src="http://drvidyahattangadi.com/wp-content/uploads/2014/12/panchkarma3.jpg" alt="">
for each post id but if I have many posts this would be wildly inefficient. Can anyone help?