angular-docs-cn/packages
Kara 333a708bb6 feat(forms): add updateOn blur option to FormControls (#18408)
By default, the value and validation status of a `FormControl` updates
whenever its value changes. If an application has heavy validation
requirements, updating on every text change can sometimes be too expensive.

This commit introduces a new option that improves performance by delaying
form control updates until the "blur" event.  To use it, set the `updateOn`
option to `blur` when instantiating the `FormControl`.

```ts
// example without validators
const c = new FormControl(, { updateOn: blur });

// example with validators
const c= new FormControl(, {
   validators: Validators.required,
   updateOn: blur
});
```

Like in AngularJS, setting `updateOn` to `blur` will delay the update of
the value as well as the validation status. Updating value and validity
together keeps the system easy to reason about, as the two will always be
in sync. It's  also worth noting that the value/validation pipeline does
still run when the form is initialized (in order to support initial values).

Closes #7113
2017-08-02 18:10:10 -07:00
..
animations build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00
benchpress fix(benchpress): compile cleanly with TS 2.4 (#18455) 2017-08-02 16:24:00 -07:00
common test(common): skip some DatePipe tests in old Chrome where Intl is buggy (#15784) 2017-08-02 15:51:59 -07:00
compiler fix(compiler): cleanly compile with TypeScript 2.4 (#18456) 2017-08-02 16:26:42 -07:00
compiler-cli release: cut the 5.0.0-beta.2 release 2017-08-02 13:21:07 -07:00
core build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00
docs refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
examples fix: Update types for TypeScript nullability support in examples 2017-04-12 11:36:19 -07:00
forms feat(forms): add updateOn blur option to FormControls (#18408) 2017-08-02 18:10:10 -07:00
http fix(http): move destructuring inside {Request,Response}Options ctor 2017-06-09 14:34:39 -07:00
language-service refactor(tsc-wrapped): move tsc-wrapped to the packages directory (#18160) 2017-07-21 12:26:16 -05:00
platform-browser refactor(platform-browser): compiler platform-browser packages cleanly (#18464) 2017-08-02 16:30:50 -07:00
platform-browser-dynamic refactor(platform-browser): compiler platform-browser packages cleanly (#18464) 2017-08-02 16:30:50 -07:00
platform-server docs(platform-server): inline PlatformOptions and add doc strings (#18264) 2017-07-25 15:58:13 -05:00
platform-webworker refactor: fix typos (#18000) 2017-07-07 16:55:17 -07:00
platform-webworker-dynamic build: import tslib rather than output TS helpers (#16901) 2017-05-23 14:01:39 -06:00
router refactor(router): compile router cleanly with TypeScript 2.4 (#18465) 2017-08-02 17:32:02 -07:00
tsc-wrapped build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00
upgrade refactor(upgrade): compile upgrade cleanly with TypeScript 2.4 (#18461) 2017-08-02 16:28:04 -07:00
README.md Revert "docs: Remove unneeded file (#18106)" 2017-07-20 16:46:47 -05:00
empty.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
es6-subset.d.ts refactor: update paths from modules/@angular to packages 2017-03-08 16:29:28 -08:00
license-banner.txt refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
system.d.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
tsconfig.json refactor(tsc-wrapped): move tsc-wrapped to the packages directory (#18160) 2017-07-21 12:26:16 -05:00
types.d.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT