angular2 routing - Angular 2/4 named router-outlet is not rendering HTML -
multiple router-outlet not working desired.
here application wire frame is:
here routing:
const routes: routes = [ { path: '', redirectto: 'dashboard', pathmatch: 'full' }, { path: 'dashboard', component: homecomponent } , { path: 'contact', children: [ { path: '', component: contactcomponent, outlet:'container' }, { path: 'list', component: contactcomponent, outlet:'container' } ] } ,{ path: "**", component: pagenotfoundcomponent } ];
and here links:
<a [routerlink]="['/contact', {outlets: {container: ['']}}]">contact</a> <a [routerlink]="['/contact/list', {outlets: {container: ['list']}}]">contact list</a>
so, on clicking link whole application goes blank , no console error. html below main router-outlet removed.
what tried was, kept both router-outlet after each other , in case container outlet called not header, footer , design.
what doing wrong here?
thanks
Comments
Post a Comment