GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing angular.dev — NgModel • Angular @returns NgModelTracks the name bound to the directive. If a parent form exists, it uses this name as a key to retrieve this control's value. Tracks whether the control is disabled. Tracks the value bound to this directive. Tracks the configuration options for this name: An alternative to setting the name attribute on the form control element. See
the example for using standalone: When set to true, the updateOn: Defines the event upon which the form control value and validity update.
Defaults to 'change'. Possible values: Event emitter for producing the Template-driven forms handle This directive has a Returns an array that represents the path from the top-level form to this control. Each index is the string name of the control on that level. The top-level directive for this control if present, otherwise null. Sets the new value for the view model and emits an @paramnewValue anyThe new value emitted by @returns voidThe value accessor for the control Validator function that returns current parse errors. Tracks last bound values to avoid unnecessary FVC updates. @returns void@paramhost ControlDirectiveHost<undefined>@parambindRequired boolean@returns void@returns voidReports the value of the control if it is present, otherwise null. Reports whether the control is valid. A control is considered valid if no validation errors exist with the current value. If the control is not present, null is returned. Reports whether the control is invalid, meaning that an error exists in the input value. If the control is not present, null is returned. Reports whether a control is pending, meaning that async validation is occurring and errors are not yet available for the input value. If the control is not present, null is returned. Reports whether the control is disabled, meaning that the control is disabled in the UI and is exempt from validation checks and excluded from aggregate values of ancestor controls. If the control is not present, null is returned. Reports whether the control is enabled, meaning that the control is included in ancestor calculations of validity or value. If the control is not present, null is returned. Reports the control's validation errors. If the control is not present, null is returned. Reports whether the control is pristine, meaning that the user has not yet changed the value in the UI. If the control is not present, null is returned. Reports whether the control is dirty, meaning that the user has changed the value in the UI. If the control is not present, null is returned. Reports whether the control is touched, meaning that the user has triggered
a Reports the validation status of the control. Possible values include: 'VALID', 'INVALID', 'DISABLED', and 'PENDING'. If the control is not present, null is returned. Reports whether the control is untouched, meaning that the user has not yet triggered
a Returns a multicasting observable that emits a validation status whenever it is calculated for the control. If the control is not present, null is returned. Returns a multicasting observable of value changes for the control that emits every time the value of the control changes in the UI or programmatically. If the control is not present, null is returned. Synchronous validator function composed of all the synchronous validators registered with this directive. Asynchronous validator function composed of all the asynchronous validators registered with this directive. Resets the control with the provided value if the control is present. @paramvalue any@returns voidReports whether the control with the given path has the error specified. @paramerrorCode stringThe code of the error to check @parampath string | (string | number)[] | undefinedA list of control names that designates how to move from the current control to the control that should be queried for errors. @returns booleanwhether the given error is present in the control at the given path. If the control is not present, false is returned. Usage notes For example, for the following
The path to the 'street' control from the root form would be 'address' -> 'street'. It can be provided to this method in one of two formats:
If no path is given, this method checks for the error on the current control. Reports error data for the control with the given path. @paramerrorCode stringThe code of the error to check @parampath string | (string | number)[] | undefinedA list of control names that designates how to move from the current control to the control that should be queried for errors. @returns anyerror data for that particular error. If the control or error is not present, null is returned. Usage notes For example, for the following
The path to the 'street' control from the root form would be 'address' -> 'street'. It can be provided to this method in one of two formats:
DescriptionCreates a The This directive is used by itself or as part of a larger form. Use the
It accepts a domain model as an optional To inspect the properties of the associated Exported byUsage NotesUsing ngModel on a standalone controlThe following examples show a simple standalone control using
When using the In the context of a parent form, it's often unnecessary to include one-way or two-way binding,
as the parent form syncs the value for you. You access its properties by exporting it into a
local template variable using If you do need to populate initial values into your form, using a one-way binding for
Using ngModel within a formThe following example shows controls using
Using a standalone ngModel within a groupThe following example shows you how to use a standalone ngModel control within a form. This controls the display of the form, but doesn't contain form data.
Setting the ngModel
|
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |