import {ObserversModule} from '@angular/cdk/observers';
ContentObserver
An injectable service that allows watching elements for changes to their content.
observe | |
---|---|
Observe content changes on an element. |
|
Parameters | |
element Element
|
The element to observe for content changes. |
Returns | |
Observable<MutationRecord[]>
|
|
observe | |
---|---|
Observe content changes on an element. |
|
Parameters | |
element ElementRef<Element>
|
The element to observe for content changes. |
Returns | |
Observable<MutationRecord[]>
|
|
CdkObserveContent
Directive that triggers a callback whenever the content of its associated element has changed.
Selector: [cdkObserveContent]
Exported as: cdkObserveContentName | Description |
---|---|
@Input()
|
Debounce interval for emitting the changes. |
@Input('cdkObserveContentDisabled')
|
Whether observing content is disabled. This option can be used to disconnect the underlying MutationObserver until it is needed. |
@Output('cdkObserveContent')
|
Event emitted for each change in the element's content. |