angular-docs-cn/packages/forms/test
Kara Erickson ebef5e697a feat(forms): add options arg to abstract controls
FormControls, FormGroups, and FormArrays now optionally accept an options
object as their second argument. Validators and async validators can be
passed in as part of this options object (though they can still be passed
in as the second and third arg as before).

```ts
const c = new FormControl(, {
   validators: [Validators.required],
   asyncValidators: [myAsyncValidator]
});
```

This commit also adds support for passing arrays of validators and async
validators to FormGroups and FormArrays, which formerly only accepted
individual functions.

```ts
const g = new FormGroup({
   one: new FormControl()
}, [myPasswordValidator, myOtherValidator]);
```

This change paves the way for adding more options to AbstractControls,
such as more fine-grained control of validation timing.
2017-07-31 11:29:32 -07:00
..
directives_spec.ts fix(forms): Update types for TypeScript nullability support 2017-04-18 12:07:33 -07:00
form_array_spec.ts feat(forms): add options arg to abstract controls 2017-07-31 11:29:32 -07:00
form_builder_spec.ts build: fix file paths after moving modules/@angular/* to packages/* 2017-03-08 16:29:28 -08:00
form_control_spec.ts feat(forms): add options arg to abstract controls 2017-07-31 11:29:32 -07:00
form_group_spec.ts feat(forms): add options arg to abstract controls 2017-07-31 11:29:32 -07:00
reactive_integration_spec.ts refactor(forms): move value accessor tests into own spec (#18356) 2017-07-26 17:55:37 -05:00
spies.ts build: fix file paths after moving modules/@angular/* to packages/* 2017-03-08 16:29:28 -08:00
template_integration_spec.ts refactor(forms): move value accessor tests into own spec (#18356) 2017-07-26 17:55:37 -05:00
validators_spec.ts fix(forms): fix min and max validator behavior on non-numbers 2017-06-08 13:59:17 -07:00
value_accessor_integration_spec.ts refactor(forms): move value accessor tests into own spec (#18356) 2017-07-26 17:55:37 -05:00