as i said here i'm developing an Angular2 app with the following project structure:
I have a primary router-outlet
inside "main" component and another router-outlet
inside "first" component.
Here is the template of the main component:
<div class="ui menu vertical">
<a class="item" *ngFor="let item of items" [routerLink]="[item.path]" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }">{{item.title}}</a>
</div>
<main>
<router-outlet></router-outlet>
</main>
Here is the template of the first sub-component:
<div class="ui secondary pointing menu">
<a *ngFor="let item of menus" class="item" [routerLink]="[item.path]" routerLinkActive="active" [routerLinkActiveOptions]="{ exact: true }">{{item.title}}</a>
<router-outlet></router-outlet>
</div>
Using this configuration i get the pages of the first component loaded in the main component, instead of the first one.
If i add name
property to the inner router, both in the routing setting and in the HTML tag, i get 404 page (created by me) that is loaded in the "app" component (at the top-level of the structure).
What could be the problem?