docs(forms): update form apis based on review feedback (#25724)

PR Close #25724
This commit is contained in:
Brandon Roberts
2018-09-17 14:36:00 -05:00
committed by Kara Erickson
parent 07c10e2844
commit a9a81f91cf
7 changed files with 75 additions and 104 deletions

View File

@ -17,14 +17,14 @@ import {NgControl} from './ng_control';
* @description
* An interface implemented by `FormGroupDirective` and `NgForm` directives.
*
* Only used by the `FormsModule`.
* Only used by the `ReactiveFormsModule` and `FormsModule`.
*/
export interface Form {
/**
* @description
* Add a control to this form.
*
* @param dir The control to add to the form
* @param dir The control directive to add to the form.
*/
addControl(dir: NgControl): void;
@ -32,15 +32,15 @@ export interface Form {
* @description
* Remove a control from this form.
*
* @param dir: The control to remove from the form
* @param dir: The control directive to remove from the form.
*/
removeControl(dir: NgControl): void;
/**
* @description
* Reports the `FormControl` associated with the provided `NgControl`.
* The control directive from which to get the `FormControl`.
*
* @param dir: The form control instance
* @param dir: The control directive.
*/
getControl(dir: NgControl): FormControl;
@ -48,7 +48,7 @@ export interface Form {
* @description
* Add a group of controls to this form.
*
* @param dir: The control group to remove
* @param dir: The control group directive to add.
*/
addFormGroup(dir: AbstractFormGroupDirective): void;
@ -56,15 +56,15 @@ export interface Form {
* @description
* Remove a group of controls to this form.
*
* @param dir: The control group to remove
* @param dir: The control group directive to remove.
*/
removeFormGroup(dir: AbstractFormGroupDirective): void;
/**
* @description
* Reports the form group for the provided control
* The `FormGroup` associated with a particular `AbstractFormGroupDirective`.
*
* @param dir: The form group to query
* @param dir: The form group directive from which to get the `FormGroup`.
*/
getFormGroup(dir: AbstractFormGroupDirective): FormGroup;
@ -72,8 +72,8 @@ export interface Form {
* @description
* Update the model for a particular control with a new value.
*
* @param dir: The control to update
* @param value: The new value for the control
* @param dir: The control directive to update.
* @param value: The new value for the control.
*/
updateModel(dir: NgControl, value: any): void;
}