Error: Cannot match any routes. URL Segment: 'builder' when having nested router-outlets
Angular 8 trying to create nested router-outlet routing
______________________________________________
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'