On this page
NgControl
class
npm Package | @angular/forms |
---|---|
Module | import { NgControl } from '@angular/forms'; |
Source | forms/src/directives/ng_control.ts |
Overview
class NgControl extends AbstractControlDirective {
name: string | null
valueAccessor: ControlValueAccessor | null
get validator: ValidatorFn | null
get asyncValidator: AsyncValidatorFn | null
viewToModelUpdate(newValue: any): void
// inherited from forms/AbstractControlDirective
get control: AbstractControl | null
get value: any
get valid: boolean | null
get invalid: boolean | null
get pending: boolean | null
get disabled: boolean | null
get enabled: boolean | null
get errors: ValidationErrors | null
get pristine: boolean | null
get dirty: boolean | null
get touched: boolean | null
get status: string | null
get untouched: boolean | null
get statusChanges: Observable<any> | null
get valueChanges: Observable<any> | null
get path: string[] | null
reset(value: any = undefined): void
hasError(errorCode: string, path?: string[]): boolean
getError(errorCode: string, path?: string[]): any
}
Description
A base class that all control directive extend. It binds a FormControl
object to a DOM element.
Used internally by Angular forms.
Members
name: string | null
valueAccessor: ControlValueAccessor | null
get validator: ValidatorFn | null
get asyncValidator: AsyncValidatorFn | null
viewToModelUpdate(newValue: any): void
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v5.angular.io/api/forms/NgControl