Dynamic image

@arctushar Both ways should be working fine however there’s a difference between them.

Here’s an example how to use either of them in your case:

<img src="{{'img/' + item.title + '.png'}}">
<img [src]="'img/' + item.title + '.png'">

I would recommend you to check out the Angular 2 Cheatsheet for JavaScript or TypeScript.

8 Likes