fix(forms): remove deprecated form provider functions (#10741)

BREAKING CHANGE:

The deprecated `provideForms()` and `disableDeprecatedForms()` functions have been removed. Please import the `FormsModule` or the `ReactiveFormsModule` from @angular/forms instead.
This commit is contained in:
Kara 2016-08-12 15:32:47 -07:00 committed by vikerman
parent 161a4dd15f
commit 79afcf0766
2 changed files with 2 additions and 24 deletions

View File

@ -6,9 +6,9 @@
* found in the LICENSE file at https://angular.io/license
*/
import {NgModule, PLATFORM_DIRECTIVES, Type} from '@angular/core';
import {NgModule, Type} from '@angular/core';
import {FORM_DIRECTIVES, InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES, REACTIVE_FORM_DIRECTIVES, SHARED_FORM_DIRECTIVES, TEMPLATE_DRIVEN_DIRECTIVES} from './directives';
import {InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES, TEMPLATE_DRIVEN_DIRECTIVES} from './directives';
import {RadioControlRegistry} from './directives/radio_control_value_accessor';
import {FormBuilder} from './form_builder';
@ -49,19 +49,3 @@ export class FormsModule {
})
export class ReactiveFormsModule {
}
/**
* @deprecated
*/
export function disableDeprecatedForms(): any[] {
return [];
}
/**
* @deprecated
*/
export function provideForms(): any[] {
return [
{provide: PLATFORM_DIRECTIVES, useValue: FORM_DIRECTIVES, multi: true}, REACTIVE_FORM_PROVIDERS
];
}

View File

@ -125,9 +125,6 @@ export declare class DefaultValueAccessor implements ControlValueAccessor {
writeValue(value: any): void;
}
/** @deprecated */
export declare function disableDeprecatedForms(): any[];
/** @experimental */
export interface Form {
addControl(dir: NgControl): void;
@ -423,9 +420,6 @@ export declare class PatternValidator implements Validator {
};
}
/** @deprecated */
export declare function provideForms(): any[];
/** @experimental */
export declare const REACTIVE_FORM_DIRECTIVES: Type<any>[][];