Why pathMatch gives "Invalid configuration of route" error?

Discussão em 'Angular' iniciado por AraDeveloper, Dezembro 10, 2024.

  1. AraDeveloper

    AraDeveloper Guest

    This is the error message I get:

    Error: Invalid configuration of route '{path: "teams/", redirectTo: "all"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.


    Here is my syntax in app.module.ts:

    const routes = [
    { path: 'teams', component: TabsComponent, children: [
    { path: '', redirectTo: 'all', pathMatch: 'full' },
    { path: ':side', component: ListComponent }
    ] },
    { path: 'new-team', component: CreateTeamComponent },
    { path: '**', redirectTo: '/teams' }
    ];


    Why do I still have the error?

    Continue reading...

Compartilhe esta Página