0
votes

After i made DetailsComponent a child of LocationComponent i get the error "EXCEPTION: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'dashboard'" when i making a default login from my app. What could be the error?

//login.html

  <button class="button" routerLink="/dashboard"><span>Login </span></button>

//route

export const DashboardRoutes: Routes =[

  {
    path: 'dashboard',

    component: DashboardComponent,
    children: [
      {path: '', redirectTo: 'location'},
      {path: 'game', component: GameComponent},

        {path: 'location', component: LocationComponent, children: [


            {path : '/details', component: DetailsComponent},


        ]



  },
1
{path : 'details', component: DetailsComponent},anshuVersatile

1 Answers

0
votes
export const DashboardRoutes: Routes =[
  {
    path: 'dashboard',
    component: DashboardComponent,
    children: [
      {path: '', redirectTo: 'location'},
      {path: 'game', component: GameComponent},
        {path: 'location', component: LocationComponent, children: [
            {path: '', redirectTo: 'details'},
            {path : 'details', component: DetailsComponent}
        ]
  },