Answer the question
In order to leave comments, you need to log in
Anchor in angular?
You need to make an anchor without using any third-party libraries. When you click on the link, there should be a transition to the top of the page. That is, at the bottom of the page, click on the link "Back to top" and the page scrolls to the very top. I thought about making a transitional header (this is a separate component that is on all pages), but I don’t know how to implement this.
Answer the question
In order to leave comments, you need to log in
Why anchor when you can scroll to the top of the page using ViewportScroller, an angular wrapper over native scroll methods.
https://ng-run.com/edit/JjqNO5JgMXGeskADd0ne
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question