i am new to angular 2 , i have an array of images and i want to display all the images in a row but none of them is being displayed even the array is not empty i am using the img tag as shown in the code
html code:
<div fxLayout="column">
<div >
</div>
<div fxLayout="row" *ngIf="doneLoadingProjectData" >
<div *ngFor="let image of images" >
<img src='image'/>
</div>
</div>
</div>
Also I believe that the array of images needs to be array (better to use JSON)of links to the images only then will the image show up on the browser when ngFor is used to display each image
Also I think Maybe a better would be to use ngOnInit so that all initialization is done when that div is called
And in the component you can run your code as you wish
Where the image array is something like this
Copy Paste this blockquote in this link you will get an idea how the data is passed link you can access each property of the JSON value as image.name and image.href. Hope you find this usefull
Need to use curly brackets when you are assigning value to src attribute
Or you can use a template expression: