export interface OnChanges
export interface OnChanges
exported from angular2/core defined in angular2/src/core/linker/interfaces.ts (line 27)
Lifecycle hooks are guaranteed to be called in the following order:
OnChanges
(if any bindings have changed),OnInit
(after the first check only),DoCheck
,AfterContentInit
,AfterContentChecked
,AfterViewInit
,AfterViewChecked
,OnDestroy
(at the very end before destruction) 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 of the changed data-bound property. The key is
the property name and the value is an instance of SimpleChange
.
Example (live example):
Members
ngOnChanges(changes: {[key: string]: SimpleChange})
ngOnChanges(changes: {[key: string]: SimpleChange})
Not Yet Documented