Directives and components can listen for some changes in application related to them.
import {Component, OnInit, OnDestroy, OnChange, OnUpdate} from 'slicky/core';
@Component({
selector: '[app]',
})
export class App implements OnInit, OnDestroy, OnChange, OnUpdate
{
public onInit(): void {}
public onDestroy(): void {}
public onChange(inputName: string, changed): void {}
public onUpdate(inputName: string, value: any): void {}
}
Called when directive with all of it's bindings (inputs, events and elements) are ready and connected.
Called when directive is detached from DOM.
Called when change in some view property occur. This event is
called before directive's input is updated and even before the input's
expression is parsed. It can also disable those steps by returning false
.
Called when directive's input's expression is parsed and the input is updated.