Visit {{myVar}} to learn!
Ng Ng Href
# AngularJS `ng-href` Directive
[ AngularJS Reference Manual](#)
* * *
## AngularJS Example
Use AngularJS to set and add a link:
[Try it Β»](#)
* * *
## Definition and Usage
The **ng-href** directive overrides the native element's href attribute.
If there is AngularJS code in the value of href, you need to use **ng-href** instead of **href**.
The `ng-href` directive ensures that the link is normal, even if the link is clicked before AngularJS executes the code.
* * *
## Syntax
The element supports this directive.
* * *
## Parameter Values
| Value | Description |
| --- | --- |
| _expression_ | A string, the result of the evaluated expression |
* * AngularJS Reference Manual](#)
YouTip