RouterOutlet
directive
Acts as a placeholder that Angular dynamically fills based on the current router state.
NgModule
Selectors
Properties
Property | Description |
---|---|
@Output('activate')activateEvents: EventEmitter<any> | |
@Output('deactivate')deactivateEvents: EventEmitter<any> | |
isActivated: boolean | Read-only. |
component: Object | Read-only. |
activatedRoute: ActivatedRoute | Read-only. |
activatedRouteData: Data | Read-only. |
Template variable references
Identifier | Usage |
---|---|
outlet | #myTemplateVar="outlet" |
Description
<router-outlet></router-outlet> <router-outlet name='left'></router-outlet> <router-outlet name='right'></router-outlet>
A router outlet will emit an activate event any time a new component is being instantiated, and a deactivate event when it is being destroyed.
<router-outlet (activate)='onActivate($event)' (deactivate)='onDeactivate($event)'></router-outlet>
Methods
ngOnDestroy() |
---|
|
ngOnInit() |
---|
|
detach() |
---|
Called when the |
|
attach() | ||||
---|---|---|---|---|
Called when the | ||||
|
ref | Type: |
activatedRoute | Type: |
deactivate() |
---|
|
activateWith() | ||||
---|---|---|---|---|
|
activatedRoute | Type: |
resolver | Type: |
© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v6.angular.io/api/router/RouterOutlet