Angular router with optional query parameters

Discussão em 'Angular' iniciado por Volodymyr Humeniuk, Novembro 11, 2024.

  1. I have router

    {
    path: 'reset-password',
    component: ResetPasswordComponent,
    }


    And I want to be able to open it as a direct link (/reset-password), or with passed parameters (/reset-password?uid=gsSxc&code=DsdxFSd), and so when creating a router snapshot I want to see the passed parameters.

    How can I do this? Do I need to create two different routers for this?

    Continue reading...

Compartilhe esta Página