router-x/src/outlet/publish-component.directive.ts
Hooks into a router outlet's events and publishes the current component to the RouterOutletComponentBus
to create a mapping
of component instances by outlet name.
Components instantiated by outlets marked with publishComponent
will be accessible by outlet name in the bus service.
Selector | router-outlet[publishComponent] |
Properties |
|
Methods |
|
constructor(outlet: RouterOutlet, componentBus: RouterOutletComponentBus, outletName: string)
|
||||||||||||
Parameters:
|
||||||||||||
ngOnDestroy |
ngOnDestroy()
|
Inherited from
Destroyable
|
Unpublishes the outlet from the bus.
Returns:
void
|
ngOnInit |
ngOnInit()
|
Registers to outlet events to publish the activated and deactivated components to the bus. *
Returns:
void
|
Protected subscribe | ||||||||||||||||||||
subscribe(observable: Observable
|
||||||||||||||||||||
Inherited from
Destroyable
|
||||||||||||||||||||
Type parameters:
|
||||||||||||||||||||
Subscribes to an observable and stores the subscription for automatic disposal.
When
Parameters:
Returns:
Subscription
The subscription created for the observable. |
||||||||||||||||||||
Protected Readonly destroyed |
Type: Subject<void>
|
Default value: new Subject()
|
Inherited from
Destroyable
|
Emits a value when |
Protected Readonly subscriptions |
Type: Subscription
|
Default value: new Subscription()
|
Inherited from
Destroyable
|
A list of all subscriptions manually added using the |