Please help me if Im missing any configuration in Angular 14.
from <img [src]="assets/images/sidebarNav">
tried using ./, ../
not working for me.
I used How to load image (and other assets) in Angular an project?
Please help me if Im missing any configuration in Angular 14.
from <img [src]="assets/images/sidebarNav">
tried using ./, ../
not working for me.
I used How to load image (and other assets) in Angular an project?
Square brackets ([]
) represent the one-way property binding from the component logic (data) to the view (target element).
If you write the source-path to the image in the view-page (html), you doesn't need property binding.
But you are mixing two things here. Either you remove the squared brackets <img src="/assets/images/sidebarNav">
or you need property binding like <img [src]="itemImageUrl">
and set the variable itemImageUrl = 'assets/images/sidebarNav';
in the component file.
But that didn't work on Angular 8 either, so this has nothing to do with your upgrading to version 14.