Skip to content
Advertisement

Tag: anchor

Prevent navigation on anchor that has routerLink

In my markup, there is [routerLink]=”(onLink | async).linkURL” And when its there, I’m unable to stop the navigation from happening when user clicks it. If I remove [routerLink]=”(onLink | async).linkURL”, the navigation is stopped as expected. Is there a way I can stop the navigation here? I’m unable to remove [routerLink]=”(onLink | async).linkURL” from the markup. My js below is

ScrollTo function in AngularJS

I’m trying to get a quick nav to work correctly. It’s floating on the side. When they click on a link, it takes them to that ID on the page. I’m following this guide from Treehouse. This is what I have for the scrolling: I initially placed it before the </body>. But I seem to be running into a race

Advertisement