docs(forms): update API reference for reactive and template-driven forms modules (#25687)

PR Close #25687
This commit is contained in:
Brandon Roberts 2018-06-28 13:53:13 -05:00 committed by Misko Hevery
parent 88f7ddb27d
commit a4405d7c6f

View File

@ -15,8 +15,10 @@ import {FormBuilder} from './form_builder';
/** /**
* The ng module for forms. * @description
* An `NgModule` that registers the directives and providers for template-driven forms.
* *
* @see [Forms Guide](/guide/forms)
*/ */
@NgModule({ @NgModule({
declarations: TEMPLATE_DRIVEN_DIRECTIVES, declarations: TEMPLATE_DRIVEN_DIRECTIVES,
@ -27,7 +29,10 @@ export class FormsModule {
} }
/** /**
* The ng module for reactive forms. * @description
* An `NgModule` that registers the directives and providers for reactive forms.
*
* @see [Reactive Forms Guide](/guide/reactive-forms)
* *
*/ */
@NgModule({ @NgModule({
@ -36,6 +41,13 @@ export class FormsModule {
exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES] exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
}) })
export class ReactiveFormsModule { export class ReactiveFormsModule {
/**
* @description
* Provides options for configuring the reactive forms module.
*
* @param opts An object of configuration options `warnOnNgModelWithFormControl` Configures when
* to emit a warning when an `ngModel binding is used with reactive form directives.
*/
static withConfig(opts: { static withConfig(opts: {
/** @deprecated as of v6 */ warnOnNgModelWithFormControl: 'never' | 'once' | 'always' /** @deprecated as of v6 */ warnOnNgModelWithFormControl: 'never' | 'once' | 'always'
}): ModuleWithProviders<ReactiveFormsModule> { }): ModuleWithProviders<ReactiveFormsModule> {