Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ______________________________________________
- Routing:
- const routes: Routes = [
- {
- path: '', canActivate: [AuthGardGuard], component: HomeComponent , children: [
- {path: 'builder', component: ViewBuilderComponent, outlet: 'builder'},
- {path: 'settings', component: SettingsComponent, outlet: 'builder'},
- ]
- },
- {path: 'login', component: LoginComponent}
- ];
- _________________________________________________
- Main outlet
- <router-outlet></router-outlet>
- ________________________________________________
- HomeComponent:
- <div>
- <a [routerLink]="['settings']"
- routerLinkActive="active-link"><mat-icon svgIcon="tune"></mat-icon> <span class="">settings</span></a>
- <a [routerLink]="['builder']"
- routerLinkActive="active-link"><mat-icon svgIcon="tune"></mat-icon> <span class="">builder</span></a>
- <div class="router">
- <router-outlet name="builder"></router-outlet>
- </div>
- </div>
- Result is Cannot match any routes. URL Segment: 'builder'
- or Cannot match any routes. URL Segment: 'settings'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement