Answer the question
In order to leave comments, you need to log in
Angular Outlet reset when going back to root?
Hello. I'm trying to figure out the outlets and there's a problem. There are routes:
{path: '.', component: AppComponent},
{path: 'test-route', component: TestComponentComponent, outlet: 'sidebar'},
{path: 'other', component: OtherComponent},
<button [routerLink]="[{outlets: {sidebar: ['test-route']}}]">Button</button>
<a [routerLink]="['other']">other</a>
<a [routerLink]="['.']">main</a>
<router-outlet></router-outlet>
<router-outlet name="sidebar"></router-outlet>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question