Skip to content

Instantly share code, notes, and snippets.

@anhkind
Last active July 10, 2017 12:33
Show Gist options
  • Save anhkind/eba98ee33f584aa84eba7c4f33bf0005 to your computer and use it in GitHub Desktop.
Save anhkind/eba98ee33f584aa84eba7c4f33bf0005 to your computer and use it in GitHub Desktop.
nested routes of a custom outlet which use parent's template
// route definition
route = {
path: '',
component: CustomLayoutComponent,
outlet: 'custom',
children: [{
path: 'child-route',
component: ChildComponent
}]
}
// parent layout component
import { Component, OnInit } from '@angular/core';
@Component({
template: `<router-outlet></router-outlet>`
})
export class CustomLayoutComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment