Relative Content

Tag Archive for angular

Angular ngSrc doesnt accept dynamic value

<ng-container *ngFor=”let image of images”> <img [ngSrc]=”‘assets/images/’ + image” alt=”My Image”> </ng-container> public images = [‘image1.jpg’, ‘image2.jpg’, ‘image3.jpg’]; I have the above code. I want to pass dynamic value to the ngSrc attribute but it doesn’t work. Am I doing something wrong ? angular You are missing to specify the height and width property which […]