What it does
Acts as a placeholder that Angular dynamically fills based on the current router state.
How to use
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.
Class Overview
class RouterOutlet implements OnDestroy {
constructor
(parentOutletMap: RouterOutletMap, location: ViewContainerRef, resolver: ComponentFactoryResolver, name: string)
outletMap
: RouterOutletMap
activateEvents
: EventEmitter
deactivateEvents
: EventEmitter
ngOnDestroy
() : void
locationInjector
: Injector
locationFactoryResolver
: ComponentFactoryResolver
isActivated
: boolean
component
: Object
activatedRoute
: ActivatedRoute
detach
() : ComponentRef<any>
attach
(ref: ComponentRef<any>, activatedRoute: ActivatedRoute)
deactivate
() : void
activate
(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver, injector: Injector, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap) : void
activateWith
(activatedRoute: ActivatedRoute, resolver?: ComponentFactoryResolver|, outletMap: RouterOutletMap)
}
Selectors
router-outlet
Class Description
Constructor
Class Details
outletMap : RouterOutletMap
activateEvents : EventEmitter
deactivateEvents : EventEmitter
ngOnDestroy() : void
locationInjector : Injector
locationFactoryResolver : ComponentFactoryResolver
isActivated : boolean
component : Object
activatedRoute : ActivatedRoute
detach() : ComponentRef<any>
attach(ref: ComponentRef<any>, activatedRoute: ActivatedRoute)
deactivate() : void
activate(activatedRoute: ActivatedRoute, resolver: ComponentFactoryResolver, injector: Injector, providers: ResolvedReflectiveProvider[], outletMap: RouterOutletMap) : void
activateWith(activatedRoute: ActivatedRoute, resolver?: ComponentFactoryResolver|, outletMap: RouterOutletMap)
exported from router/index, defined in router/src/directives/router_outlet.ts