ChangeDetectorRef class
Provides influence over how change detection should execute for a component.
In practice, this is often used just for markForCheck, which sets a
component that uses ChangeDetectionStrategy.OnPush
as dirty for future
change detection.
NOTE: This API is currently transitional. Please use carefully, and
avoid methods that are marked @Deprecated(...)
, as they will be eventually
removed entirely.
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
checkNoChanges(
) → void -
Forces synchronous change detection, failing if any bindings have changed. [...]
@Deprecated('Not intended be public API and will be removed')
-
detach(
) → void - Detaches the component from the change detection hierarchy. [...]
-
detectChanges(
) → void -
Forces synchronous change detection of this component and its children. [...]
@Deprecated('Breaks assumptions around change detection and will be removed')
-
markForCheck(
) → void -
Marks this and all
ChangeDetectionStrategy.OnPush
ancestors as dirty. [...] -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
reattach(
) → void - Reattaches a component that was detach-ed previously from the hierarchy. [...]
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited