docs(forms): update API reference for reactive and template-driven forms modules (#25687)
PR Close #25687
This commit is contained in:
parent
6def18a95e
commit
abd29f5049
|
@ -13,8 +13,10 @@ import {RadioControlRegistry} from './directives/radio_control_value_accessor';
|
|||
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({
|
||||
declarations: TEMPLATE_DRIVEN_DIRECTIVES,
|
||||
|
@ -22,6 +24,14 @@ import {FormBuilder} from './form_builder';
|
|||
exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
|
||||
})
|
||||
export class FormsModule {
|
||||
/**
|
||||
* @description
|
||||
* Provides options for configuring the template-driven forms module.
|
||||
*
|
||||
* @param opts An object of configuration options
|
||||
* * `warnOnDeprecatedNgFormSelector` Configures when to emit a warning when the deprecated
|
||||
* `ngForm` selector is used.
|
||||
*/
|
||||
static withConfig(opts: {
|
||||
/** @deprecated as of v6 */ warnOnDeprecatedNgFormSelector?: 'never' | 'once' | 'always',
|
||||
}): ModuleWithProviders {
|
||||
|
@ -34,8 +44,11 @@ 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({
|
||||
declarations: [REACTIVE_DRIVEN_DIRECTIVES],
|
||||
|
@ -43,6 +56,14 @@ export class FormsModule {
|
|||
exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
|
||||
})
|
||||
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: {
|
||||
/** @deprecated as of v6 */ warnOnNgModelWithFormControl: 'never' | 'once' | 'always'
|
||||
}): ModuleWithProviders<ReactiveFormsModule> {
|
||||
|
|
Loading…
Reference in New Issue