Is there a difference between these?
<img src="{{url}}">
<img [src]="url">
I know in AngularJS we had ng-src directive which was prefered to used to prevent loading image from {{url}} before angular takes over. Is this the same case?
<img [src]="heroImageUrl"> is short of
<img bind-src="heroImageUrl"> this code will result same as <img src="{{url}}">. [src] this is for property binding. However when you need to bind some data to attribute you cannot use it. For example:
<td [attr.colspan]="1 + 1"> since colspan is not a property but html attribute.
[src]is not a known HTML attribute due to the[]s, so the browser will not process it and will not make a request to the URL. It's really easy to try it out by just running the HTML you provided with different URLs and checking the network requests in your developer tools.