angular-cn/goldens/public-api
Dylan Hunn 34ce635e3a feat(forms): undo revert and add ng-submitted class to forms that have been submitted. (#42132) (#42132)
As previously discussed in pull/31070 and issues/30486, this would be useful because it is often desirable to apply styles to fields that are both `ng-invalid` and `ng-pristine` after the first attempt at form submission, but Angular does not provide any simple way to do this (although evidently Angularjs did). This will now be possible with a descendant selector such as `.ng-submitted .ng-invalid`.

In this implementation, the directive that sets control status classes on forms and formGroups has its set of statuses widened to include `ng-submitted`. Then, in the event that `is('submitted')` is invoked, the `submitted` property of the control container is returned iff it exists. This is preferred over checking whether the container is a `Form` or `FormGroup` directly to avoid reflecting on those classes.

Closes #30486.

PR Close #42132.

This reverts commit 00b1444d12, undoing the rollback of this change.

PR Close #42132
2021-06-08 14:02:29 -07:00
..
animations fix(platform-browser): update started state on reset (#41608) 2021-05-25 20:28:41 +00:00
common fix(common): add body as an optional property on the options of HttpClient.delete (#19438) (#41723) 2021-05-04 21:09:58 -07:00
compiler-cli feat(compiler): emit diagnostic for shadow dom components with an invalid selector (#42245) 2021-06-07 10:44:57 -07:00
core fix(common): infer correct type when `trackBy` is used in `ngFor` (#41995) 2021-06-03 11:33:26 -07:00
elements feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
forms feat(forms): undo revert and add ng-submitted class to forms that have been submitted. (#42132) (#42132) 2021-06-08 14:02:29 -07:00
localize ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-browser perf(core): minor improvements to listener instructions (#41807) 2021-04-30 14:14:00 -07:00
platform-browser-dynamic ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-server feat(platform-server): allow shimming the global env sooner (#40559) 2021-02-12 08:55:25 -08: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 docs: change Navigation from type to interface (#42281) 2021-06-01 14:13:20 -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 fix(upgrade): fix HMR for hybrid applications (#40045) 2020-12-10 13:40:53 -08:00
manage.js ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00