core/src/rxjs/on-observer/directives/on-observer.directive.ts
Documentation in OnObserverActiveDirective.onObserver to allow in-template tooltips.
Selector | [onObserver] |
Properties |
|
Methods |
|
Inputs |
Accessors |
onObserver | |
Type : Observable<T>
|
|
Renders the template when the specified observable makes any of the calls specified using FeaturesView ContextUse the microsyntax Delayed renderingSpecify a value for Auto destroySpecify Countdown updatesWhen Remaining is provided by the Multi view modeSpecify View indexIn multi-view mode, the context will contain the index of the view, which can be used for calculations and styling. Multi call interceptionCreate different interception combinations by specifying more than one call name using |
onObserverCalls | |
Type : ObserverName | []
|
|
Defines the calls to intercept from the observable. Only intercepted calls will render the template. |
onObserverCountdownInterval | |
Type : DurationAnnotation | "animationFrames"
|
|
Only used when passing a value to
|
onObserverShowAfter | |
Type : DurationAnnotation
|
|
(Optional) The duration for which the directive should wait before rendering the view once an intercepted call is made. You can specify a number, which will be treated as milliseconds, or a string with the format of
Default is TODO: ADD LINK TO TOUR OR FULL WIKI PAGE Read more About render flow. |
onObserverShowFor | |
Type : DurationAnnotation
|
|
(Optional) The duration for which the view should be rendered. When the duration passes, the view will be auto destroyed. You can specify a number, which will be treated as milliseconds, or a string with the format of
During the time the view is rendered, the context will be updated with a countdown object to facilitate any UI part used to
indicate countdown to the user. The countdown will be exposed through the When unspecified, the view will be destroyed immediately once the observer detects a call different to the intercepted ones. TODO: ADD LINK TO TOUR OR FULL WIKI PAGE Read more About render flow. |
onObserverViewMode | |
Type : ViewMode
|
|
(Optional) The view mode the directive will operate in:
Default is |
Static ngTemplateContextGuard | |||||||||
ngTemplateContextGuard(directive: OnObserverDirective<T>, context)
|
|||||||||
Type parameters:
|
|||||||||
Parameters:
Returns:
OnObserverContext<T>
|
|||||||||
ngOnInit |
ngOnInit()
|
Inherited from
OnObserverBaseDirective
|
Returns:
void
|
ngOnDestroy |
ngOnDestroy()
|
Inherited from
Destroyable
|
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 renderOnCallsTo |
Type: ObserverName | ObserverName[]
|
Inherited from
OnObserverBaseDirective
|
Protected selector |
Type: string
|
Default value: 'onObserver'
|
Inherited from
OnObserverBaseDirective
|
Protected Optional countdownInterval |
Type: DurationAnnotation | "animationFrames"
|
Inherited from
OnObserverBaseDirective
|
Only used when passing a value to
|
Protected Readonly input |
Type: BehaviorSubject<Observable | null>
|
Default value: new BehaviorSubject(null as Observable<T> | null)
|
Inherited from
OnObserverBaseDirective
|
Why BehaviorSubject<... | null> and not Subject<...>
This leads to subscribing in ngOnInit, to allow Angular time to initialize those.
BUT, if |
Protected showAfter |
Type: DurationAnnotation
|
Default value: 0
|
Inherited from
OnObserverBaseDirective
|
(Optional) The duration for which the directive should wait before rendering the view once an intercepted call is made. You can specify a number, which will be treated as milliseconds, or a string with the format of
Default is TODO: ADD LINK TO TOUR OR FULL WIKI PAGE Read more About render flow. ⚠️ Extending classes should:
|
Protected Optional showFor |
Type: DurationAnnotation
|
Inherited from
OnObserverBaseDirective
|
(Optional) The duration for which the view should be rendered. When the duration passes, the view will be auto destroyed. You can specify a number, which will be treated as milliseconds, or a string with the format of
During the time the view is rendered, the context will be updated with a countdown object to facilitate any UI part used to
indicate countdown to the user. The countdown will be exposed through the When unspecified, the view will be destroyed immediately once the observer detects a call different to the intercepted ones. TODO: ADD LINK TO TOUR OR FULL WIKI PAGE Read more About render flow. ⚠️ Extending classes should:
|
Protected viewMode |
Type: ViewMode
|
Default value: 'single'
|
Inherited from
OnObserverBaseDirective
|
(Optional) The view mode the directive will operate in:
Default is ⚠️ Extending classes should:
|
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 |
onObserver | ||||||
setonObserver(value: Observable
|
||||||
Renders the template when the specified observable makes any of the calls specified using FeaturesView ContextUse the microsyntax Delayed renderingSpecify a value for Auto destroySpecify Countdown updatesWhen Remaining is provided by the Multi view modeSpecify View indexIn multi-view mode, the context will contain the index of the view, which can be used for calculations and styling. Multi call interceptionCreate different interception combinations by specifying more than one call name using
Parameters :
Returns:
void
|
||||||
onObserverCalls | ||||||
setonObserverCalls(calls: ObserverName | ObserverName[])
|
||||||
Defines the calls to intercept from the observable. Only intercepted calls will render the template.
Parameters :
Returns:
void
|
||||||
onObserverViewMode | ||||||
setonObserverViewMode(viewMode: ViewMode)
|
||||||
(Optional) The view mode the directive will operate in:
Default is
Parameters :
Returns:
void
|
||||||
onObserverShowAfter | ||||||
setonObserverShowAfter(duration: DurationAnnotation)
|
||||||
(Optional) The duration for which the directive should wait before rendering the view once an intercepted call is made. You can specify a number, which will be treated as milliseconds, or a string with the format of
Default is TODO: ADD LINK TO TOUR OR FULL WIKI PAGE Read more About render flow.
Parameters :
Returns:
void
|
||||||
onObserverShowFor | ||||||
setonObserverShowFor(duration: DurationAnnotation)
|
||||||
(Optional) The duration for which the view should be rendered. When the duration passes, the view will be auto destroyed. You can specify a number, which will be treated as milliseconds, or a string with the format of
During the time the view is rendered, the context will be updated with a countdown object to facilitate any UI part used to
indicate countdown to the user. The countdown will be exposed through the When unspecified, the view will be destroyed immediately once the observer detects a call different to the intercepted ones. TODO: ADD LINK TO TOUR OR FULL WIKI PAGE Read more About render flow.
Parameters :
Returns:
void
|
||||||
onObserverCountdownInterval | ||||||
setonObserverCountdownInterval(duration: DurationAnnotation | "animationFrames")
|
||||||
Only used when passing a value to
|
Name | Type | Optional |
duration |
DurationAnnotation | "animationFrames"
|
No |
void