Reputation: 23615
I have a question about Angular (the code comes from the Angular tutorial)
It's about this code:
<a href="#/phones/{{phone.id}}" class="thumb"><img ng-src="{{phone.imageUrl}}"></a>
The tutorial says:
[...]using an image tag with the
ngSrc
directive. That directive prevents the browser from treating the Angular{{ expression }}
markup literally
However, in the same line of code, there is this part:
<a href="#/phones/{{phone.id}}"
in which the same construct is used, namely the value of a property in a string
.
Imho the href=""
and the src=""
are both properties of a html tag, but for img
there is a separate directive (ng-src
) but for the A
tag there is no ng-href
directive?
PS I'm a .Net dev, newbee to Angular
Upvotes: 0
Views: 711