App is working fine but the Upload child routes are accessible without '/upload' too. For example '/photo', '/advertisement'. This should not be happen. I don't know why this is happening. If anyone know the solution then please reply.
app.routing.ts
{ path: '', redirectTo: '/dashboard', pathMatch: 'full'},
{path: '', loadChildren: 'app/campsite/campsite.module#CampsiteModule'},
{path: 'login', loadChildren: 'app/login/login.module#LoginModule'}
campsite.routing.ts
path: '', component: CampsiteComponent, children: [
{path: 'dashboard', component: HomeComponent, canActivate: [AuthGuard]},
{path: 'gallery', component: GalleryComponent, canActivate: [AuthGuard]},
{path: 'upload', loadChildren: './upload/upload.module#UploadModule', canActivate: [AuthGuard]}
]
upload.routing.ts
path: '', component: UploadComponent, children: [
{path: 'photo', component: PhotoComponent, canActivate: [AuthGuard]},
{path: 'advertisement', component: AdvertisementComponent, canActivate: [AuthGuard]},
{path: 'video', component: VideoComponent, canActivate: [AuthGuard]},
{path: 'logo', component: LogoComponent, canActivate: [AuthGuard]},
{ path: 'photo', pathMatch: 'full', redirectTo: 'photo' }
]
Lazy Component Upload is loading in App Component Routing too