AngularJS a Directive

Definition and Usage

AngularJS modified <a> element's default behavior.

When the user clicks on an element with an empty href Property <a> When an element is, AngularJS will prevent the page from reloading.

Example

Links within AngularJS applications will not reload the page:

<a href="">Click Me!</a>
<div ng-app="">
    <a href="">Click Me!</a>
</div>

Try It Yourself