href overrides ng-click in Angular.js

ghz 1years ago ⋅ 4073 views

Question

When both, href and ng-click attributes are defined:

<a href="#" ng-click="logout()">Sign out</a>

the href attribute takes precedence over ng-click.

I am looking for a way to raise priority of ng-click.

href is required for Twitter Bootstrap, I can't remove it.


Answer

You should probably just use a button tag if you don't need a uri.