How does the page get back to the top when angular5 routes switch?

when using routing to switch pages, such as A page to B page, if the A page scrolls down, the B page is also scrolling distance when it is routed to B, how to get back to the top of the page each time you switch

Feb.26,2021

listen for this event

Router.events.NavigationEnd
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9e4b2-19c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9e4b2-19c7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?