Each component can contain router-outlet.
I think that you should create App
component which would contain routes to Dashboard
component and Default
component. In those components you should also put router-outlet and create different routes.
This way you can have different templates for each group of components.
@RouteConfig([
{ path: '/dahsboard/...', name: 'Dashboard', component: DashboardComponent },
{ path: '/...', name: 'Default', component: DefaultComponent }
])
export class AppComponent
Your template for this component can be as simple as <router-outlet></router-outlet>
.
Then your child components can have different routing and different templates.
@RouteConfig([
{ path: '/home', name: 'Home', component: HomeComponent },
{ path: '/sign-up', name: 'SignUp', component: SignupComponent }
])
export class DefaultComponent
And it's template should also contain <router-outlet></router-outlet>
.