Files
angular-docs-cn/modules/@angular/forms/src/form_providers.ts
T

39 lines
994 B
TypeScript
Raw Normal View History

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
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';
/**
2016-07-18 03:50:31 -07:00
* The ng module for forms.
2016-08-17 07:44:39 -07:00
* @stable
*/
2016-07-18 03:50:31 -07:00
@NgModule({
declarations: TEMPLATE_DRIVEN_DIRECTIVES,
providers: [RadioControlRegistry],
2016-07-18 03:50:31 -07:00
exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]
})
export class FormsModule {
}
/**
2016-07-18 03:50:31 -07:00
* The ng module for reactive forms.
2016-08-17 07:44:39 -07:00
* @stable
*/
2016-07-18 03:50:31 -07:00
@NgModule({
declarations: [REACTIVE_DRIVEN_DIRECTIVES],
providers: [FormBuilder, RadioControlRegistry],
2016-07-18 03:50:31 -07:00
exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
})
export class ReactiveFormsModule {
2016-08-17 07:44:39 -07:00
}