I got an array to which I store name and some other String properties.
I also have the "ImagePath". The solution I found was that in the image source we use square brackets [ ] around the source.
I do know that it means property binding, but why do we use it around the src. What is the best way to understand property, besides this use case.
Export class RecipeListComponent implements OnInit {
recipes: Recipe[] = [
new Recipe('A Test Recipe', 'This is simply a test', 'https://upload.wikimedia.org/wikipedia/commons/1/15/Recipe_logo.jpeg'),
new Recipe('A Test Recipe', 'This is simply a test', 'https://upload.wikimedia.org/wikipedia/commons/1/15/Recipe_logo.jpeg')
];
<span class="float-right">
<img [src] ="recipe.imagePath"
alt="{{ recipe.name }}"
class="img-fluid" style="max-height: 50px;">
</span>