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';
|
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,
|
||||||
@ -22,6 +24,14 @@ import {FormBuilder} from './form_builder';
|
|||||||
exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
|
exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
|
||||||
})
|
})
|
||||||
export class FormsModule {
|
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: {
|
static withConfig(opts: {
|
||||||
/** @deprecated as of v6 */ warnOnDeprecatedNgFormSelector?: 'never' | 'once' | 'always',
|
/** @deprecated as of v6 */ warnOnDeprecatedNgFormSelector?: 'never' | 'once' | 'always',
|
||||||
}): ModuleWithProviders {
|
}): ModuleWithProviders {
|
||||||
@ -34,7 +44,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({
|
||||||
@ -43,6 +56,14 @@ 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> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user