This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

ControlContainer

npm Package @angular/forms
Module import { ControlContainer } from '@angular/forms';
Source forms/src/directives/control_container.ts

Overview

      
      class ControlContainer extends AbstractControlDirective {
  name: string
  get formDirective: Form | null
  get path: string[] | null
  // 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 directive that contains multiple NgControls.

Only used by the forms module.

Subclasses

Members

      
      name: string
    

      
      get formDirective: Form | null
    

Get the form to which this container belongs.


      
      get path: string[] | null
    

Get the path to this container.