Implement this interface to get notified when any data-bound property of your directive changes.
ngOnChanges is called right after the data-bound properties have been checked and before view and content children are checked if at least one of them has changed.
The changes
parameter contains an entry for each changed data-bound
property. The key is the property name and the value is an instance of
SimpleChange.
Examples
Try this live example from the Lifecycle Hooks page:
Constructors
Properties
- hashCode → int
-
Get a hash code for this object.
read-only, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
ngOnChanges(
Map<String, SimpleChange> changes) → dynamic -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
toString(
) → String -
Returns a string representation of this object.
inherited