ControlContainer
包含多个已注册 NgControl
实例的指令的基类。仅由表单模块使用。
A base class for directives that contain multiple registered instances of NgControl
. Only used by the forms module.
abstract class ControlContainer extends AbstractControlDirective {
name: string | number | null
formDirective: Form | null
path: string[] | null
// 继承自 forms/AbstractControlDirective
abstract control: AbstractControl | null
value: any
valid: boolean | null
invalid: boolean | null
pending: boolean | null
disabled: boolean | null
enabled: boolean | null
errors: ValidationErrors | null
pristine: boolean | null
dirty: boolean | null
touched: boolean | null
status: string | null
untouched: boolean | null
statusChanges: Observable<any> | null
valueChanges: Observable<any> | null
path: string[] | null
validator: ValidatorFn | null
asyncValidator: AsyncValidatorFn | null
reset(value: any = undefined): void
hasError(errorCode: string, path?: string | (string | number)[]): boolean
getError(errorCode: string, path?: string | (string | number)[]): any
}
属性
属性 | 说明 |
---|---|
name: string | number | null | 控件的名称 The name for the control |
formDirective: Form | null | 只读 控件的顶级表单指令。 The top-level form directive for the control. |
path: string[] | null | 只读 该组的路径。 The path to this group. |