guyja guyja - 1 year ago 102
AngularJS Question

override angular ui-router for links to page anchors

I have links to anchors on my page (a href="#idea"). ui-router obviously overrides them. Is there a way to use both in harmony? Thank you.

Answer Source

Well you aren't supposed to use it on a href this way, instead you should add it like the following:

<a href="" ng-click="gotoAnchor()">...</a>

You can see an example of this at the bottom of the $anchorScroll API here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download