I\'ve used both href
and ng-href
and I couldn\'t see the difference between them.
Why does Angular have the ng-href
attribute, and
If you need to bind values from your model you use the directive. For example:
Dynamic link
Change the link dynamically:
In the example above, the value of address
is programmatically bound to the value in the input text box, which you can change.
If you don't need to be dynamic (i.e. react to a change in the model's state), then you can simply stay with href
:
Static link