angular where to put images code example

Example 1: how to render images in angulae

use the url as below
<img src="assets/img.jpg" alt="">

Example 2: import images angular

export class sample Component implements OnInit {
   imageSrc = 'assets/images/iphone.png'  
   imageAlt = 'iPhone'

Example 3: angular img

<img alt="xxx" class="xxx" src="https://xxx/128x128.png">
  
<!--
  -- Property binding with [] around the property to be bound
						  [src]= "accountInfo.profiles[0].image" 
  --interpolation binding syntax
						   src= "{{accountInfo.profiles[0].image}}" 
-->

Example 4: import images angular

<img [src]="imageSrc" [alt]="imageAlt" />

<img src="{{imageSrc}}" alt="{{imageAlt}}" />

Tags:

Misc Example