OptionalasrOptionalasrProtectedautoProtectedcdProtecteddisabledOptionaldropdownOptionalinputOptionallangOptionaloptionsProtectedsubscriptionProtectedtouchedOptionalvalue: stringOptionaldropdown: NgbDropdownOptionalemit: booleanThe changed properties.
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Optionalvalue: ServiceProviderOptionalvalue: stringOptionaldropdown: NgbDropdownThe callback function to register
Registers a callback function that is called when the control's value changes in the UI.
This method is called by the forms API on initialization to update the form model when values propagate from the view to the model.
When implementing the registerOnChange method in your own value accessor,
save the given function so your class calls it at the appropriate time.
The following example stores the provided function as an internal method.
registerOnChange(fn: (_: any) => void): void {
this._onChange = fn;
}
When the value changes in the UI, call the registered function to allow the forms API to update itself:
host: {
'(change)': '_onChange($event.target.value)'
}
The callback function to register
Registers a callback function that is called by the forms API on initialization to update the form model on blur.
When implementing registerOnTouched in your own value accessor, save the given
function so your class calls it when the control should be considered
blurred or "touched".
The following example stores the provided function as an internal method.
registerOnTouched(fn: any): void {
this._onTouched = fn;
}
On blur (or equivalent), your class should call the registered function to allow the forms API to update itself:
host: {
'(blur)': '_onTouched()'
}
Optionalprovider: ServiceProviderOptionaldropdown: NgbDropdownOptionalsetProtectedsubscribeThe control to validate against.
A map of validation errors if validation fails, otherwise null.
Optionalvalue: ServiceProvider
A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.