-1

I am trying to build a simple master/detail view in angular(4) with an img in 'detail' component but i couldn't figure out how to change the img src every time i select an element from the master list.

Image links are like this;

"https://example.com/someapi/id.png"

Reşit Körsu
  • 530
  • 2
  • 8
  • 17

1 Answers1

1

You shuld bind [src] to the image's url, like this:

<img [src]="imgUrl" [alt]="imgAlt">

Wenris
  • 176
  • 1
  • 9