Get routerLink DOM element after clicking without binding (click) event

Discussão em 'Angular' iniciado por Michał B, Março 23, 2025.

  1. Michał B

    Michał B Guest

    Let's assume I have something like this in my code:

    <button routerLink="/account" routerLinkActive="active">Account</button>


    Is there a way to access this element when it's clicked but without binding click event? At any stage of navigating process?

    I want to create reusable component and it would be nice not having to adding some additional logic except routerLink.

    Continue reading...

Compartilhe esta Página