The difference between [src] and src in Angular2
In Angular1,
<img ng-src="{{imageUrl}}">
This will hide the broken image icon if the imageUrl file is empty.
But in Angular2 both
<img src="{{imageUrl}}">
and the equivalent of ngSrc
<img [src]="imageUrl">
the small broken image icon is still displayed as an image placeholder if imageUrl is empty.
What is the actual difference there?
+4
3 answers