guyja guyja - 4 months ago 48
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.


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.