refactor(forms): remove FORM_PROVIDERS, FORM_DIRECTIVES, REACTIVE_FORM_PROVIDERS, REACTIVE_DIRECTIVES
All of these have been replaced by FormsModule and ReactiveFormsModule.
This commit is contained in:

committed by
Victor Berchet

parent
c03e25a7b7
commit
501b83441d
@ -18,7 +18,7 @@ import {NgControl} from './ng_control';
|
||||
*
|
||||
* Only used by the forms module.
|
||||
*
|
||||
* @experimental
|
||||
* @stable
|
||||
*/
|
||||
export interface Form {
|
||||
/**
|
||||
|
@ -6,33 +6,20 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {NgModule, Type} from '@angular/core';
|
||||
import {NgModule} from '@angular/core';
|
||||
|
||||
import {InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES, TEMPLATE_DRIVEN_DIRECTIVES} from './directives';
|
||||
import {RadioControlRegistry} from './directives/radio_control_value_accessor';
|
||||
import {FormBuilder} from './form_builder';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Shorthand set of providers used for building Angular forms.
|
||||
* @stable
|
||||
*/
|
||||
export const FORM_PROVIDERS: Type<any>[] = [RadioControlRegistry];
|
||||
|
||||
/**
|
||||
* Shorthand set of providers used for building reactive Angular forms.
|
||||
* @stable
|
||||
*/
|
||||
export const REACTIVE_FORM_PROVIDERS: Type<any>[] = [FormBuilder, RadioControlRegistry];
|
||||
|
||||
/**
|
||||
* The ng module for forms.
|
||||
* @stable
|
||||
*/
|
||||
@NgModule({
|
||||
declarations: TEMPLATE_DRIVEN_DIRECTIVES,
|
||||
providers: [FORM_PROVIDERS],
|
||||
providers: [RadioControlRegistry],
|
||||
exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
|
||||
})
|
||||
export class FormsModule {
|
||||
@ -44,7 +31,7 @@ export class FormsModule {
|
||||
*/
|
||||
@NgModule({
|
||||
declarations: [REACTIVE_DRIVEN_DIRECTIVES],
|
||||
providers: [REACTIVE_FORM_PROVIDERS],
|
||||
providers: [FormBuilder, RadioControlRegistry],
|
||||
exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
|
||||
})
|
||||
export class ReactiveFormsModule {
|
||||
|
@ -21,7 +21,6 @@
|
||||
*/
|
||||
|
||||
|
||||
export {FORM_DIRECTIVES, REACTIVE_FORM_DIRECTIVES} from './directives';
|
||||
export {AbstractControlDirective} from './directives/abstract_control_directive';
|
||||
export {AbstractFormGroupDirective} from './directives/abstract_form_group_directive';
|
||||
export {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';
|
||||
|
Reference in New Issue
Block a user