| 
									
										
										
										
											2016-06-23 09:47:54 -07:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @license | 
					
						
							|  |  |  |  * Copyright Google Inc. All Rights Reserved. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Use of this source code is governed by an MIT-style license that can be | 
					
						
							|  |  |  |  * found in the LICENSE file at https://angular.io/license
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-10 11:15:59 -07:00
										 |  |  | import {FormControl, FormGroup} from '../model'; | 
					
						
							| 
									
										
										
										
											2016-06-08 16:38:52 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-12 16:37:42 -07:00
										 |  |  | import {AbstractFormGroupDirective} from './abstract_form_group_directive'; | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  | import {NgControl} from './ng_control'; | 
					
						
							| 
									
										
										
										
											2016-06-12 16:37:42 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-08 16:38:52 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							| 
									
										
										
										
											2016-06-10 19:10:17 -07:00
										 |  |  |  * An interface that {@link FormGroupDirective} and {@link NgForm} implement. | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  |  * | 
					
						
							|  |  |  |  * Only used by the forms module. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @experimental | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | export interface Form { | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Add a control to this form. | 
					
						
							|  |  |  |    */ | 
					
						
							| 
									
										
										
										
											2016-06-23 09:55:26 -07:00
										 |  |  |   addControl(dir: NgControl): void; | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Remove a control from this form. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   removeControl(dir: NgControl): void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							| 
									
										
										
										
											2016-06-10 19:10:17 -07:00
										 |  |  |    * Look up the {@link FormControl} associated with a particular {@link NgControl}. | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  |    */ | 
					
						
							| 
									
										
										
										
											2016-06-10 11:15:59 -07:00
										 |  |  |   getControl(dir: NgControl): FormControl; | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Add a group of controls to this form. | 
					
						
							|  |  |  |    */ | 
					
						
							| 
									
										
										
										
											2016-06-12 16:37:42 -07:00
										 |  |  |   addFormGroup(dir: AbstractFormGroupDirective): void; | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Remove a group of controls from this form. | 
					
						
							|  |  |  |    */ | 
					
						
							| 
									
										
										
										
											2016-06-12 16:37:42 -07:00
										 |  |  |   removeFormGroup(dir: AbstractFormGroupDirective): void; | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							| 
									
										
										
										
											2016-06-12 16:37:42 -07:00
										 |  |  |    * Look up the {@link FormGroup} associated with a particular {@link AbstractFormGroupDirective}. | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  |    */ | 
					
						
							| 
									
										
										
										
											2016-06-12 16:37:42 -07:00
										 |  |  |   getFormGroup(dir: AbstractFormGroupDirective): FormGroup; | 
					
						
							| 
									
										
										
										
											2016-06-08 15:36:24 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * Update the model for a particular control with a new value. | 
					
						
							|  |  |  |    */ | 
					
						
							|  |  |  |   updateModel(dir: NgControl, value: any): void; | 
					
						
							|  |  |  | } |