angular2 routing - Angular 2/4 named router-outlet is not rendering HTML -


multiple router-outlet not working desired.

here application wire frame is: enter image description here

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.

like thisenter image description here

what doing wrong here?

thanks


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -