ChangeDetectorRef
Base class for Angular Views, provides change detection functionality.
A change-detection tree collects all views that are to be checked for changes.
Use the methods to add and remove views from the tree, initiate change-detection,
and explicitly mark views as _dirty_
, meaning that they have changed and need to be rerendered.
Example
Manual change detection run:
export class MyComponent {
constructor(private cdr: ChangeDetectorRef) {
}
runManual() {
this.cdr.detectChanges();
}
}
Methods
checkNoChanges
#
checkNoChanges(): void
detach
#
detach(): void
detectChanges
#
detectChanges(): void
markForCheck
#
markForCheck(): void
reattach
#
reattach(): void