1export class sample Component implements OnInit {
2 imageSrc = 'assets/images/iphone.png'
3 imageAlt = 'iPhone'
4
1<img alt="xxx" class="xxx" src="https://xxx/128x128.png">
2
3<!--
4 -- Property binding with [] around the property to be bound
5 [src]= "accountInfo.profiles[0].image"
6 --interpolation binding syntax
7 src= "{{accountInfo.profiles[0].image}}"
8-->
1<img [src]="imageSrc" [alt]="imageAlt" />
2
3<img src="{{imageSrc}}" alt="{{imageAlt}}" />
4