I cannot go from the login page to the control panel page when I use children in routing as follows:
const appRoutes: Routes = [ { path: '', redirectTo: 'login', pathMatch: 'full' }, { path: 'login', component: LoginComponent,pathMatch: 'full' }, { path: 'dashboard',pathMatch: 'full', component: DashboardComponent , children: [ { path: 'online-submission/:moduleName',pathMatch: 'full', component: OnlineSubmissionComponent, data:{ breadcrumb: "online-submission" } , children: [ { path: 'batch-upload-members',pathMatch: 'full', component: BatchUploadMembersComponent, data:{ breadcrumb: "batch-upload-members" } }, { path: 'select-members',pathMatch: 'full', component: SelectMembersComponent, data:{ breadcrumb: "select-members" } } ] } ] }, { path: '**', component: PageNotFoundComponent }
];
However, when I remove the children attribute from the routes and make them, the Brazilian brothers work fine. What is the problem when I do children's routes? I am using cli 1.6.0-rc.1
What have i tried so far?
AuthGuard commenting does not work, so the problem is not that this part
I checked that only when I have them as childrenβs routes (which I need to create crackers) does this problem arise. If all routes are siblings, routing works correctly
used {enableTracing:true} in RouterModule.forRoot , where I find NavigationStart(id: 4, url: '/dashboard') , which seems to be the correct URL for the DashboardComponent
search on SO for similar named questions, but none of them raised the same problem:
Angular 2.0.1 Router EmptyError: no items in sequence
Angular2 routing problems - zone related error No items in sequence
Angular 2.0.1 Router EmptyError: no items in sequence
source share