NgDocTypeControl
Generic types: | T |
Extends: |
|
Interface describing Type Control
Properties
Name | Type | Description |
---|---|---|
default | T | undefined | The default value of the input |
description | string | undefined | The description of the input (based on the comment) |
isManual | boolean | undefined | Determines if the property is manually added by the user using |
name | string | undefined | The name of the input for which it is created |
options | string[] | undefined | The list of possible values, it usually works only for Type Aliases which has several values |
Methods
registerOnChange()inherited from
| ||||||
---|---|---|---|---|---|---|
@description 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 @usageNotes Store the change functionThe following example stores the provided function as an internal method.
When the value changes in the UI, call the registered function to allow the forms API to update itself:
| ||||||
Presentation
| ||||||
Parameters
Returnsvoid |
registerOnTouched()inherited from
| ||||||
---|---|---|---|---|---|---|
@description Registers a callback function that is called by the forms API on initialization to update the form model on blur. When implementing @usageNotes Store the callback functionThe following example stores the provided function as an internal method.
On blur (or equivalent), your class should call the registered function to allow the forms API to update itself:
| ||||||
Presentation
| ||||||
Parameters
Returnsvoid |
setDisabledState()inherited from
| ||||||
---|---|---|---|---|---|---|
@description Function that is called by the forms API when the control status changes to or from 'DISABLED'. Depending on the status, it enables or disables the appropriate DOM element. @usageNotes The following is an example of writing the disabled property to a native DOM element:
| ||||||
Presentation
| ||||||
Parameters
Returnsvoid |
writeValue()inherited from
| ||||||
---|---|---|---|---|---|---|
@description Writes a new value to the element. This method is called by the forms API to write to the view when programmatic changes from model to view are requested. @usageNotes Write a value to the elementThe following example writes a value to the native DOM element.
| ||||||
Presentation
| ||||||
Parameters
Returnsvoid |