angular-docs-cn/goldens/public-api
Andrew Kushnir 0723331b2a refactor(forms): move common validators-related logic to the `AbstractControlDirective` class (#38280)
This commit refactors validators-related logic that is common across most of the directives.

A couple notes on this refactoring:
* common logic was moved to the `AbstractControlDirective` class (including `validator` and
`asyncValidator` getters)
* sync/async validators are now composed in `AbstractControlDirective` class eagerly when validators
are set with `_setValidators` and `_setAsyncValidators` calls and the result is stored in directive
instance (thus getters return cached versions of validator fn). This is needed to make sure composed
validator function remains the same (retains its identity) for a given directive instance, so that
this function can be added and later removed from an instance of an AbstractControl-based class
(like `FormControl`). Preserving validator function is required to perform proper cleanup (in followup
PRs) of the AbstractControl-based classes when a directive is destroyed.

PR Close #38280
2020-10-28 09:48:20 -07:00
..
animations ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
common fix(common): add boolean to valid json for testing (#37893) 2020-10-05 17:07:41 -07:00
compiler-cli refactor(compiler-cli): split out template diagnostics package (#38576) 2020-09-03 14:02:31 -07:00
core fix(core): Store ICU state in `LView` rather than in `TView` (#39233) 2020-10-21 18:33:00 -07:00
elements feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
forms refactor(forms): move common validators-related logic to the `AbstractControlDirective` class (#38280) 2020-10-28 09:48:20 -07:00
localize ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-browser ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-browser-dynamic ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-server fix(platform-server): Resolve absolute URL from baseUrl (#39334) 2020-10-21 09:41:58 -07:00
platform-webworker ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-webworker-dynamic ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
router fix(router): incorrect signature for createUrlTree (#39347) 2020-10-20 13:36:12 -07:00
service-worker feat(service-worker): add the option to prefer network for navigation requests (#38565) 2020-09-22 09:29:20 -07:00
upgrade ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
manage.js ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00