chore(forms): update forms labels (#10873)

This commit is contained in:
Kara 2016-08-17 07:44:39 -07:00 committed by vikerman
parent 675e582ffd
commit 6fd5bc075d
24 changed files with 93 additions and 90 deletions

View File

@ -69,12 +69,12 @@ export const REACTIVE_DRIVEN_DIRECTIVES: Type<any>[] =
* }) * })
* class MyApp {} * class MyApp {}
* ``` * ```
* @experimental * @stable
*/ */
export const FORM_DIRECTIVES: Type<any>[][] = [TEMPLATE_DRIVEN_DIRECTIVES, SHARED_FORM_DIRECTIVES]; export const FORM_DIRECTIVES: Type<any>[][] = [TEMPLATE_DRIVEN_DIRECTIVES, SHARED_FORM_DIRECTIVES];
/** /**
* @experimental * @stable
*/ */
export const REACTIVE_FORM_DIRECTIVES: Type<any>[][] = export const REACTIVE_FORM_DIRECTIVES: Type<any>[][] =

View File

@ -16,7 +16,7 @@ import {AbstractControl} from '../model';
* *
* Only used internally in the forms module. * Only used internally in the forms module.
* *
* @experimental * @stable
*/ */
export abstract class AbstractControlDirective { export abstract class AbstractControlDirective {
get control(): AbstractControl { throw new BaseException('unimplemented'); } get control(): AbstractControl { throw new BaseException('unimplemented'); }

View File

@ -20,7 +20,7 @@ import {AsyncValidatorFn, ValidatorFn} from './validators';
/** /**
* This is a base class for code shared between {@link NgModelGroup} and {@link FormGroupName}. * This is a base class for code shared between {@link NgModelGroup} and {@link FormGroupName}.
* *
* @experimental * @stable
*/ */
export class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy { export class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {
/** @internal */ /** @internal */

View File

@ -24,7 +24,7 @@ export const CHECKBOX_VALUE_ACCESSOR: any = {
* <input type="checkbox" name="rememberLogin" ngModel> * <input type="checkbox" name="rememberLogin" ngModel>
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -15,7 +15,7 @@ import {Form} from './form_interface';
* *
* Only used by the forms module. * Only used by the forms module.
* *
* @experimental * @stable
*/ */
export class ControlContainer extends AbstractControlDirective { export class ControlContainer extends AbstractControlDirective {
name: string; name: string;

View File

@ -16,7 +16,7 @@ import {OpaqueToken} from '@angular/core';
* *
* Please see {@link DefaultValueAccessor} for more information. * Please see {@link DefaultValueAccessor} for more information.
* *
* @experimental * @stable
*/ */
export interface ControlValueAccessor { export interface ControlValueAccessor {
/** /**
@ -39,6 +39,6 @@ export interface ControlValueAccessor {
* Used to provide a {@link ControlValueAccessor} for form controls. * Used to provide a {@link ControlValueAccessor} for form controls.
* *
* See {@link DefaultValueAccessor} for how to implement one. * See {@link DefaultValueAccessor} for how to implement one.
* @experimental * @stable
*/ */
export const NG_VALUE_ACCESSOR: OpaqueToken = new OpaqueToken('NgValueAccessor'); export const NG_VALUE_ACCESSOR: OpaqueToken = new OpaqueToken('NgValueAccessor');

View File

@ -27,7 +27,7 @@ export const DEFAULT_VALUE_ACCESSOR: any = {
* <input type="text" name="searchQuery" ngModel> * <input type="text" name="searchQuery" ngModel>
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -18,11 +18,11 @@ function unimplemented(): any {
/** /**
* A base class that all control directive extend. * A base class that all control directive extend.
* It binds a {@link Control} object to a DOM element. * It binds a {@link FormControl} object to a DOM element.
* *
* Used internally by Angular forms. * Used internally by Angular forms.
* *
* @experimental * @stable
*/ */
export abstract class NgControl extends AbstractControlDirective { export abstract class NgControl extends AbstractControlDirective {
name: string = null; name: string = null;

View File

@ -52,7 +52,7 @@ export const ngControlStatusHost = {
* Directive automatically applied to Angular form controls that sets CSS classes * Directive automatically applied to Angular form controls that sets CSS classes
* based on control status (valid/invalid/dirty/etc). * based on control status (valid/invalid/dirty/etc).
* *
* @experimental * @stable
*/ */
@Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost}) @Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost})
export class NgControlStatus extends AbstractControlStatus { export class NgControlStatus extends AbstractControlStatus {
@ -63,7 +63,7 @@ export class NgControlStatus extends AbstractControlStatus {
* Directive automatically applied to Angular form groups that sets CSS classes * Directive automatically applied to Angular form groups that sets CSS classes
* based on control status (valid/invalid/dirty/etc). * based on control status (valid/invalid/dirty/etc).
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -85,7 +85,7 @@ const resolvedPromise = Promise.resolve(null);
* } * }
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]', selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]',

View File

@ -49,7 +49,7 @@ const resolvedPromise = Promise.resolve(null);
* } * }
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: '[ngModel]:not([formControlName]):not([formControl])', selector: '[ngModel]:not([formControlName]):not([formControl])',

View File

@ -55,7 +55,7 @@ export const modelGroupProvider: any = {
* This example declares a model group for a user's name. The value and validation state of * This example declares a model group for a user's name. The value and validation state of
* this group can be accessed separately from the overall form. * this group can be accessed separately from the overall form.
* *
* @experimental * @stable
*/ */
@Directive({selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'}) @Directive({selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'})
export class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy { export class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {

View File

@ -70,7 +70,7 @@ export const formControlBinding: any = {
* } * }
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'}) @Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'})

View File

@ -92,7 +92,7 @@ export const controlNameBinding: any = {
* } * }
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({selector: '[formControlName]', providers: [controlNameBinding]}) @Directive({selector: '[formControlName]', providers: [controlNameBinding]})
export class FormControlName extends NgControl implements OnChanges, OnDestroy { export class FormControlName extends NgControl implements OnChanges, OnDestroy {

View File

@ -94,7 +94,7 @@ export const formDirectiveProvider: any = {
* } * }
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: '[formGroup]', selector: '[formGroup]',

View File

@ -68,7 +68,7 @@ export const formGroupNameProvider: any = {
* This example syncs the form group for the user's name. The value and validation state of * This example syncs the form group for the user's name. The value and validation state of
* this group can be accessed separately from the overall form. * this group can be accessed separately from the overall form.
* *
* @experimental * @stable
*/ */
@Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]}) @Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]})
export class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { export class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {
@ -131,7 +131,7 @@ export const formArrayNameProvider: any = {
* } * }
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]}) @Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]})
export class FormArrayName extends ControlContainer implements OnInit, OnDestroy { export class FormArrayName extends ControlContainer implements OnInit, OnDestroy {

View File

@ -37,7 +37,7 @@ function _extractId(valueString: string): string {
* https://bugzilla.mozilla.org/show_bug.cgi?id=1024350 * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/ * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: selector:
@ -100,7 +100,7 @@ export class SelectControlValueAccessor implements ControlValueAccessor {
* </select> * </select>
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({selector: 'option'}) @Directive({selector: 'option'})
export class NgSelectOption implements OnDestroy { export class NgSelectOption implements OnDestroy {

View File

@ -45,7 +45,7 @@ abstract class HTMLCollection {
/** /**
* The accessor for writing a value and listening to changes on a select element. * The accessor for writing a value and listening to changes on a select element.
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: selector:

View File

@ -31,7 +31,7 @@ import {NG_VALIDATORS, Validators} from '../validators';
* } * }
* ``` * ```
* *
* @experimental * @stable
*/ */
export interface Validator { validate(c: AbstractControl): {[key: string]: any}; } export interface Validator { validate(c: AbstractControl): {[key: string]: any}; }
@ -53,7 +53,7 @@ export const REQUIRED_VALIDATOR: any = {
* <input name="fullName" ngModel required> * <input name="fullName" ngModel required>
* ``` * ```
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: '[required][formControlName],[required][formControl],[required][ngModel]', selector: '[required][formControlName],[required][formControl],[required][ngModel]',
@ -63,12 +63,12 @@ export class RequiredValidator {
} }
/** /**
* @experimental * @stable
*/ */
export interface ValidatorFn { (c: AbstractControl): {[key: string]: any}; } export interface ValidatorFn { (c: AbstractControl): {[key: string]: any}; }
/** /**
* @experimental * @stable
*/ */
export interface AsyncValidatorFn { export interface AsyncValidatorFn {
(c: AbstractControl): any /*Promise<{[key: string]: any}>|Observable<{[key: string]: any}>*/; (c: AbstractControl): any /*Promise<{[key: string]: any}>|Observable<{[key: string]: any}>*/;
@ -91,7 +91,7 @@ export const MIN_LENGTH_VALIDATOR: any = {
* A directive which installs the {@link MinLengthValidator} for any `formControlName`, * A directive which installs the {@link MinLengthValidator} for any `formControlName`,
* `formControl`, or control with `ngModel` that also has a `minlength` attribute. * `formControl`, or control with `ngModel` that also has a `minlength` attribute.
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]', selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',
@ -125,7 +125,7 @@ export const MAX_LENGTH_VALIDATOR: any = {
* `formControl`, * `formControl`,
* or control with `ngModel` that also has a `maxlength` attribute. * or control with `ngModel` that also has a `maxlength` attribute.
* *
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]', selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',
@ -160,7 +160,7 @@ export const PATTERN_VALIDATOR: any = {
* ``` * ```
* <input [name]="fullName" pattern="[a-zA-Z ]*" ngModel> * <input [name]="fullName" pattern="[a-zA-Z ]*" ngModel>
* ``` * ```
* @experimental * @stable
*/ */
@Directive({ @Directive({
selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]', selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',

View File

@ -53,7 +53,7 @@ import {AbstractControl, FormArray, FormControl, FormGroup} from './model';
* } * }
* ``` * ```
* *
* @experimental * @stable
*/ */
@Injectable() @Injectable()
export class FormBuilder { export class FormBuilder {

View File

@ -16,19 +16,19 @@ import {FormBuilder} from './form_builder';
/** /**
* Shorthand set of providers used for building Angular forms. * Shorthand set of providers used for building Angular forms.
* @experimental * @stable
*/ */
export const FORM_PROVIDERS: Type<any>[] = [RadioControlRegistry]; export const FORM_PROVIDERS: Type<any>[] = [RadioControlRegistry];
/** /**
* Shorthand set of providers used for building reactive Angular forms. * Shorthand set of providers used for building reactive Angular forms.
* @experimental * @stable
*/ */
export const REACTIVE_FORM_PROVIDERS: Type<any>[] = [FormBuilder, RadioControlRegistry]; export const REACTIVE_FORM_PROVIDERS: Type<any>[] = [FormBuilder, RadioControlRegistry];
/** /**
* The ng module for forms. * The ng module for forms.
* @experimental * @stable
*/ */
@NgModule({ @NgModule({
declarations: TEMPLATE_DRIVEN_DIRECTIVES, declarations: TEMPLATE_DRIVEN_DIRECTIVES,
@ -40,7 +40,7 @@ export class FormsModule {
/** /**
* The ng module for reactive forms. * The ng module for reactive forms.
* @experimental * @stable
*/ */
@NgModule({ @NgModule({
declarations: [REACTIVE_DRIVEN_DIRECTIVES], declarations: [REACTIVE_DRIVEN_DIRECTIVES],
@ -48,4 +48,4 @@ export class FormsModule {
exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES] exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]
}) })
export class ReactiveFormsModule { export class ReactiveFormsModule {
} }

View File

@ -71,7 +71,7 @@ function coerceToAsyncValidator(asyncValidator: AsyncValidatorFn | AsyncValidato
} }
/** /**
* @experimental * @stable
*/ */
export abstract class AbstractControl { export abstract class AbstractControl {
/** @internal */ /** @internal */
@ -368,7 +368,7 @@ export abstract class AbstractControl {
* can be bound to a DOM element instead. This `FormControl` can be configured with a custom * can be bound to a DOM element instead. This `FormControl` can be configured with a custom
* validation function. * validation function.
* *
* @experimental * @stable
*/ */
export class FormControl extends AbstractControl { export class FormControl extends AbstractControl {
/** @internal */ /** @internal */
@ -467,14 +467,15 @@ export class FormControl extends AbstractControl {
* controls, but is of variable length. * controls, but is of variable length.
* *
* *
* @experimental * @stable
*/ */
export class FormGroup extends AbstractControl { export class FormGroup extends AbstractControl {
private _optionals: {[key: string]: boolean}; private _optionals: {[key: string]: boolean};
constructor( constructor(
public controls: {[key: string]: AbstractControl}, optionals: {[key: string]: boolean} = null, public controls: {[key: string]: AbstractControl},
validator: ValidatorFn = null, asyncValidator: AsyncValidatorFn = null) { /* @deprecated */ optionals: {[key: string]: boolean} = null, validator: ValidatorFn = null,
asyncValidator: AsyncValidatorFn = null) {
super(validator, asyncValidator); super(validator, asyncValidator);
this._optionals = isPresent(optionals) ? optionals : {}; this._optionals = isPresent(optionals) ? optionals : {};
this._initObservables(); this._initObservables();
@ -510,6 +511,7 @@ export class FormGroup extends AbstractControl {
/** /**
* Mark the named control as non-optional. * Mark the named control as non-optional.
* @deprecated
*/ */
include(controlName: string): void { include(controlName: string): void {
StringMapWrapper.set(this._optionals, controlName, true); StringMapWrapper.set(this._optionals, controlName, true);
@ -518,6 +520,7 @@ export class FormGroup extends AbstractControl {
/** /**
* Mark the named control as optional. * Mark the named control as optional.
* @deprecated
*/ */
exclude(controlName: string): void { exclude(controlName: string): void {
StringMapWrapper.set(this._optionals, controlName, false); StringMapWrapper.set(this._optionals, controlName, false);
@ -651,7 +654,7 @@ export class FormGroup extends AbstractControl {
* as broken change detection. * as broken change detection.
* *
* *
* @experimental * @stable
*/ */
export class FormArray extends AbstractControl { export class FormArray extends AbstractControl {
constructor( constructor(

View File

@ -23,7 +23,7 @@ import {AbstractControl} from './model';
* ### Example * ### Example
* *
* {@example core/forms/ts/ng_validators/ng_validators.ts region='ng_validators'} * {@example core/forms/ts/ng_validators/ng_validators.ts region='ng_validators'}
* @experimental * @stable
*/ */
export const NG_VALIDATORS: OpaqueToken = new OpaqueToken('NgValidators'); export const NG_VALIDATORS: OpaqueToken = new OpaqueToken('NgValidators');
@ -35,7 +35,7 @@ export const NG_VALIDATORS: OpaqueToken = new OpaqueToken('NgValidators');
* *
* See {@link NG_VALIDATORS} for more details. * See {@link NG_VALIDATORS} for more details.
* *
* @experimental * @stable
*/ */
export const NG_ASYNC_VALIDATORS: OpaqueToken = new OpaqueToken('NgAsyncValidators'); export const NG_ASYNC_VALIDATORS: OpaqueToken = new OpaqueToken('NgAsyncValidators');
@ -51,7 +51,7 @@ export const NG_ASYNC_VALIDATORS: OpaqueToken = new OpaqueToken('NgAsyncValidato
* var loginControl = new FormControl("", Validators.required) * var loginControl = new FormControl("", Validators.required)
* ``` * ```
* *
* @experimental * @stable
*/ */
export class Validators { export class Validators {
/** /**

View File

@ -1,4 +1,4 @@
/** @experimental */ /** @stable */
export declare abstract class AbstractControl { export declare abstract class AbstractControl {
asyncValidator: AsyncValidatorFn; asyncValidator: AsyncValidatorFn;
dirty: boolean; dirty: boolean;
@ -55,7 +55,7 @@ export declare abstract class AbstractControl {
}): void; }): void;
} }
/** @experimental */ /** @stable */
export declare abstract class AbstractControlDirective { export declare abstract class AbstractControlDirective {
control: AbstractControl; control: AbstractControl;
dirty: boolean; dirty: boolean;
@ -75,7 +75,7 @@ export declare abstract class AbstractControlDirective {
reset(value?: any): void; reset(value?: any): void;
} }
/** @experimental */ /** @stable */
export declare class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy { export declare class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy {
asyncValidator: AsyncValidatorFn; asyncValidator: AsyncValidatorFn;
control: FormGroup; control: FormGroup;
@ -86,12 +86,12 @@ export declare class AbstractFormGroupDirective extends ControlContainer impleme
ngOnInit(): void; ngOnInit(): void;
} }
/** @experimental */ /** @stable */
export interface AsyncValidatorFn { export interface AsyncValidatorFn {
(c: AbstractControl): any; (c: AbstractControl): any;
} }
/** @experimental */ /** @stable */
export declare class CheckboxControlValueAccessor implements ControlValueAccessor { export declare class CheckboxControlValueAccessor implements ControlValueAccessor {
onChange: (_: any) => void; onChange: (_: any) => void;
onTouched: () => void; onTouched: () => void;
@ -101,21 +101,21 @@ export declare class CheckboxControlValueAccessor implements ControlValueAccesso
writeValue(value: any): void; writeValue(value: any): void;
} }
/** @experimental */ /** @stable */
export declare class ControlContainer extends AbstractControlDirective { export declare class ControlContainer extends AbstractControlDirective {
formDirective: Form; formDirective: Form;
name: string; name: string;
path: string[]; path: string[];
} }
/** @experimental */ /** @stable */
export interface ControlValueAccessor { export interface ControlValueAccessor {
registerOnChange(fn: any): void; registerOnChange(fn: any): void;
registerOnTouched(fn: any): void; registerOnTouched(fn: any): void;
writeValue(obj: any): void; writeValue(obj: any): void;
} }
/** @experimental */ /** @stable */
export declare class DefaultValueAccessor implements ControlValueAccessor { export declare class DefaultValueAccessor implements ControlValueAccessor {
onChange: (_: any) => void; onChange: (_: any) => void;
onTouched: () => void; onTouched: () => void;
@ -136,13 +136,13 @@ export interface Form {
updateModel(dir: NgControl, value: any): void; updateModel(dir: NgControl, value: any): void;
} }
/** @experimental */ /** @stable */
export declare const FORM_DIRECTIVES: Type<any>[][]; export declare const FORM_DIRECTIVES: Type<any>[][];
/** @experimental */ /** @stable */
export declare const FORM_PROVIDERS: Type<any>[]; export declare const FORM_PROVIDERS: Type<any>[];
/** @experimental */ /** @stable */
export declare class FormArray extends AbstractControl { export declare class FormArray extends AbstractControl {
controls: AbstractControl[]; controls: AbstractControl[];
length: number; length: number;
@ -162,7 +162,7 @@ export declare class FormArray extends AbstractControl {
}): void; }): void;
} }
/** @experimental */ /** @stable */
export declare class FormArrayName extends ControlContainer implements OnInit, OnDestroy { export declare class FormArrayName extends ControlContainer implements OnInit, OnDestroy {
asyncValidator: AsyncValidatorFn; asyncValidator: AsyncValidatorFn;
control: FormArray; control: FormArray;
@ -175,7 +175,7 @@ export declare class FormArrayName extends ControlContainer implements OnInit, O
ngOnInit(): void; ngOnInit(): void;
} }
/** @experimental */ /** @stable */
export declare class FormBuilder { export declare class FormBuilder {
array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): FormArray; array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): FormArray;
control(value: Object, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]): FormControl; control(value: Object, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]): FormControl;
@ -186,7 +186,7 @@ export declare class FormBuilder {
}): FormGroup; }): FormGroup;
} }
/** @experimental */ /** @stable */
export declare class FormControl extends AbstractControl { export declare class FormControl extends AbstractControl {
constructor(value?: any, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]); constructor(value?: any, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]);
patchValue(value: any, options?: { patchValue(value: any, options?: {
@ -207,7 +207,7 @@ export declare class FormControl extends AbstractControl {
}): void; }): void;
} }
/** @experimental */ /** @stable */
export declare class FormControlDirective extends NgControl implements OnChanges { export declare class FormControlDirective extends NgControl implements OnChanges {
asyncValidator: AsyncValidatorFn; asyncValidator: AsyncValidatorFn;
control: FormControl; control: FormControl;
@ -222,7 +222,7 @@ export declare class FormControlDirective extends NgControl implements OnChanges
viewToModelUpdate(newValue: any): void; viewToModelUpdate(newValue: any): void;
} }
/** @experimental */ /** @stable */
export declare class FormControlName extends NgControl implements OnChanges, OnDestroy { export declare class FormControlName extends NgControl implements OnChanges, OnDestroy {
asyncValidator: AsyncValidatorFn; asyncValidator: AsyncValidatorFn;
control: FormControl; control: FormControl;
@ -238,7 +238,7 @@ export declare class FormControlName extends NgControl implements OnChanges, OnD
viewToModelUpdate(newValue: any): void; viewToModelUpdate(newValue: any): void;
} }
/** @experimental */ /** @stable */
export declare class FormGroup extends AbstractControl { export declare class FormGroup extends AbstractControl {
controls: { controls: {
[key: string]: AbstractControl; [key: string]: AbstractControl;
@ -250,8 +250,8 @@ export declare class FormGroup extends AbstractControl {
}, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn); }, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn);
addControl(name: string, control: AbstractControl): void; addControl(name: string, control: AbstractControl): void;
contains(controlName: string): boolean; contains(controlName: string): boolean;
exclude(controlName: string): void; /** @deprecated */ exclude(controlName: string): void;
include(controlName: string): void; /** @deprecated */ include(controlName: string): void;
patchValue(value: { patchValue(value: {
[key: string]: any; [key: string]: any;
}, {onlySelf}?: { }, {onlySelf}?: {
@ -269,7 +269,7 @@ export declare class FormGroup extends AbstractControl {
}): void; }): void;
} }
/** @experimental */ /** @stable */
export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges { export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges {
control: FormGroup; control: FormGroup;
directives: NgControl[]; directives: NgControl[];
@ -295,17 +295,17 @@ export declare class FormGroupDirective extends ControlContainer implements Form
updateModel(dir: NgControl, value: any): void; updateModel(dir: NgControl, value: any): void;
} }
/** @experimental */ /** @stable */
export declare class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { export declare class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {
name: string; name: string;
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]); constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
} }
/** @experimental */ /** @stable */
export declare class FormsModule { export declare class FormsModule {
} }
/** @experimental */ /** @stable */
export declare class MaxLengthValidator implements Validator { export declare class MaxLengthValidator implements Validator {
constructor(maxLength: string); constructor(maxLength: string);
validate(c: AbstractControl): { validate(c: AbstractControl): {
@ -313,7 +313,7 @@ export declare class MaxLengthValidator implements Validator {
}; };
} }
/** @experimental */ /** @stable */
export declare class MinLengthValidator implements Validator { export declare class MinLengthValidator implements Validator {
constructor(minLength: string); constructor(minLength: string);
validate(c: AbstractControl): { validate(c: AbstractControl): {
@ -321,16 +321,16 @@ export declare class MinLengthValidator implements Validator {
}; };
} }
/** @experimental */ /** @stable */
export declare const NG_ASYNC_VALIDATORS: OpaqueToken; export declare const NG_ASYNC_VALIDATORS: OpaqueToken;
/** @experimental */ /** @stable */
export declare const NG_VALIDATORS: OpaqueToken; export declare const NG_VALIDATORS: OpaqueToken;
/** @experimental */ /** @stable */
export declare const NG_VALUE_ACCESSOR: OpaqueToken; export declare const NG_VALUE_ACCESSOR: OpaqueToken;
/** @experimental */ /** @stable */
export declare abstract class NgControl extends AbstractControlDirective { export declare abstract class NgControl extends AbstractControlDirective {
asyncValidator: AsyncValidatorFn; asyncValidator: AsyncValidatorFn;
name: string; name: string;
@ -339,17 +339,17 @@ export declare abstract class NgControl extends AbstractControlDirective {
abstract viewToModelUpdate(newValue: any): void; abstract viewToModelUpdate(newValue: any): void;
} }
/** @experimental */ /** @stable */
export declare class NgControlStatus extends AbstractControlStatus { export declare class NgControlStatus extends AbstractControlStatus {
constructor(cd: NgControl); constructor(cd: NgControl);
} }
/** @experimental */ /** @stable */
export declare class NgControlStatusGroup extends AbstractControlStatus { export declare class NgControlStatusGroup extends AbstractControlStatus {
constructor(cd: ControlContainer); constructor(cd: ControlContainer);
} }
/** @experimental */ /** @stable */
export declare class NgForm extends ControlContainer implements Form { export declare class NgForm extends ControlContainer implements Form {
control: FormGroup; control: FormGroup;
controls: { controls: {
@ -376,7 +376,7 @@ export declare class NgForm extends ControlContainer implements Form {
updateModel(dir: NgControl, value: any): void; updateModel(dir: NgControl, value: any): void;
} }
/** @experimental */ /** @stable */
export declare class NgModel extends NgControl implements OnChanges, OnDestroy { export declare class NgModel extends NgControl implements OnChanges, OnDestroy {
asyncValidator: AsyncValidatorFn; asyncValidator: AsyncValidatorFn;
control: FormControl; control: FormControl;
@ -397,13 +397,13 @@ export declare class NgModel extends NgControl implements OnChanges, OnDestroy {
viewToModelUpdate(newValue: any): void; viewToModelUpdate(newValue: any): void;
} }
/** @experimental */ /** @stable */
export declare class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy { export declare class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {
name: string; name: string;
constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]); constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]);
} }
/** @experimental */ /** @stable */
export declare class NgSelectOption implements OnDestroy { export declare class NgSelectOption implements OnDestroy {
id: string; id: string;
ngValue: any; ngValue: any;
@ -412,7 +412,7 @@ export declare class NgSelectOption implements OnDestroy {
ngOnDestroy(): void; ngOnDestroy(): void;
} }
/** @experimental */ /** @stable */
export declare class PatternValidator implements Validator { export declare class PatternValidator implements Validator {
constructor(pattern: string); constructor(pattern: string);
validate(c: AbstractControl): { validate(c: AbstractControl): {
@ -420,21 +420,21 @@ export declare class PatternValidator implements Validator {
}; };
} }
/** @experimental */ /** @stable */
export declare const REACTIVE_FORM_DIRECTIVES: Type<any>[][]; export declare const REACTIVE_FORM_DIRECTIVES: Type<any>[][];
/** @experimental */ /** @stable */
export declare const REACTIVE_FORM_PROVIDERS: Type<any>[]; export declare const REACTIVE_FORM_PROVIDERS: Type<any>[];
/** @experimental */ /** @stable */
export declare class ReactiveFormsModule { export declare class ReactiveFormsModule {
} }
/** @experimental */ /** @stable */
export declare class RequiredValidator { export declare class RequiredValidator {
} }
/** @experimental */ /** @stable */
export declare class SelectControlValueAccessor implements ControlValueAccessor { export declare class SelectControlValueAccessor implements ControlValueAccessor {
onChange: (_: any) => void; onChange: (_: any) => void;
onTouched: () => void; onTouched: () => void;
@ -445,7 +445,7 @@ export declare class SelectControlValueAccessor implements ControlValueAccessor
writeValue(value: any): void; writeValue(value: any): void;
} }
/** @experimental */ /** @stable */
export declare class SelectMultipleControlValueAccessor implements ControlValueAccessor { export declare class SelectMultipleControlValueAccessor implements ControlValueAccessor {
onChange: (_: any) => void; onChange: (_: any) => void;
onTouched: () => void; onTouched: () => void;
@ -456,21 +456,21 @@ export declare class SelectMultipleControlValueAccessor implements ControlValueA
writeValue(value: any): void; writeValue(value: any): void;
} }
/** @experimental */ /** @stable */
export interface Validator { export interface Validator {
validate(c: AbstractControl): { validate(c: AbstractControl): {
[key: string]: any; [key: string]: any;
}; };
} }
/** @experimental */ /** @stable */
export interface ValidatorFn { export interface ValidatorFn {
(c: AbstractControl): { (c: AbstractControl): {
[key: string]: any; [key: string]: any;
}; };
} }
/** @experimental */ /** @stable */
export declare class Validators { export declare class Validators {
static compose(validators: ValidatorFn[]): ValidatorFn; static compose(validators: ValidatorFn[]): ValidatorFn;
static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn; static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn;