130 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			130 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
 | 
						|
p.location-badge.
 | 
						|
  exported from <a href='../forms'>angular2/forms</a>
 | 
						|
  defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.34/modules/angular2/src/forms/model.ts#L165-L249">angular2/src/forms/model.ts (line 165)</a>
 | 
						|
 | 
						|
:markdown
 | 
						|
  Defines a part of a form, of fixed length, that can contain other controls.
 | 
						|
  
 | 
						|
  A ControlGroup aggregates the values and errors of each <a href='Control-class.html'><code>Control</code></a> in the group. Thus, if
 | 
						|
  one of the controls
 | 
						|
  in a group is invalid, the entire group is invalid. Similarly, if a control changes its value,
 | 
						|
  the entire group
 | 
						|
  changes as well.
 | 
						|
  
 | 
						|
  `ControlGroup` is one of the three fundamental building blocks used to define forms in Angular,
 | 
						|
  along with
 | 
						|
  <a href='Control-class.html'><code>Control</code></a> and <a href='ControlArray-class.html'><code>ControlArray</code></a>. <a href='ControlArray-class.html'><code>ControlArray</code></a> can also contain other controls,
 | 
						|
  but is of variable
 | 
						|
  length.
 | 
						|
  
 | 
						|
  
 | 
						|
.l-main-section
 | 
						|
  h2 Members
 | 
						|
  .l-sub-section
 | 
						|
    h3 constructor
 | 
						|
 | 
						|
    
 | 
						|
    pre.prettyprint
 | 
						|
      code.
 | 
						|
        constructor(controls: StringMap<String, AbstractControl>, optionals?: StringMap<String, boolean>, validator?: Function)
 | 
						|
    
 | 
						|
    :markdown
 | 
						|
      
 | 
						|
      
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
  .l-sub-section
 | 
						|
    h3 controls
 | 
						|
 | 
						|
    
 | 
						|
    :markdown
 | 
						|
      
 | 
						|
      
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
  .l-sub-section
 | 
						|
    h3 addControl
 | 
						|
 | 
						|
    
 | 
						|
    pre.prettyprint
 | 
						|
      code.
 | 
						|
        addControl(name: string, c: AbstractControl)
 | 
						|
    
 | 
						|
    :markdown
 | 
						|
      
 | 
						|
      
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
  .l-sub-section
 | 
						|
    h3 removeControl
 | 
						|
 | 
						|
    
 | 
						|
    pre.prettyprint
 | 
						|
      code.
 | 
						|
        removeControl(name: string)
 | 
						|
    
 | 
						|
    :markdown
 | 
						|
      
 | 
						|
      
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
  .l-sub-section
 | 
						|
    h3 include
 | 
						|
 | 
						|
    
 | 
						|
    pre.prettyprint
 | 
						|
      code.
 | 
						|
        include(controlName: string)
 | 
						|
    
 | 
						|
    :markdown
 | 
						|
      
 | 
						|
      
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
  .l-sub-section
 | 
						|
    h3 exclude
 | 
						|
 | 
						|
    
 | 
						|
    pre.prettyprint
 | 
						|
      code.
 | 
						|
        exclude(controlName: string)
 | 
						|
    
 | 
						|
    :markdown
 | 
						|
      
 | 
						|
      
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
  .l-sub-section
 | 
						|
    h3 contains
 | 
						|
 | 
						|
    
 | 
						|
    pre.prettyprint
 | 
						|
      code.
 | 
						|
        contains(controlName: string)
 | 
						|
    
 | 
						|
    :markdown
 | 
						|
      
 | 
						|
      
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 |