Does anyone know how to use Angular 4 and programmatically scroll the page at the top? My use case is that I have a search page and the input is at the top, and links to other pages of the search results are at the bottom. When the user clicks the link (2,3,4 ...), I would like the page to fill in new results (functionality completed), and then scroll up the page to show the results (this function is not complete).
I see that this is possible with jQuery ( Scroll to top of page ), but I was wondering if there is a way to stay in Angular 4.
Any help is greatly appreciated.
source
share