Page does not scroll to top when i route from one component to other in angular 4(now 5)?

Discussão em 'Angular' iniciado por JpG, Março 18, 2025.

  1. JpG

    JpG Guest

    I am using angular 5 and cli version is 1.5.2 and i am facing issues with routing.

    When navigating from one route to another then scrolling down a bit and navigate back to the previous route, the page remains at the same scroll position. Currently navigate from one view to another then scroll down a bit and navigate back to the previous view. the page remains at the same scroll position.

    But i need page to be scrolled to the top when navigating from one route to another.

    Also i need to know whether this is the default routing behaviour in angular?

    Continue reading...

Compartilhe esta Página