angular/modules/playground
Dylan Hunn 89d299105a feat(forms): Implement strict types for the Angular Forms package. (#43834)
This PR strongly types the forms package by adding generics to AbstractControl classes as well as FormBuilder. This makes forms type-safe and null-safe, for both controls and values.

The design uses a "control-types" approach. In other words, the type parameter on FormGroup is an object containing controls, and the type parameter on FormArray is an array of controls.

Special thanks to Alex Rickabaugh and Andrew Kushnir for co-design & implementation, to Sonu Kapoor and Netanel Basal for illustrative prior art, and to Cédric Exbrayat for extensive testing and validation.

BREAKING CHANGE: Forms classes accept a generic.

Forms model classes now accept a generic type parameter. Untyped versions of these classes are available to opt-out of the new, stricter behavior.

PR Close #43834
2022-04-12 17:37:04 +00:00
..
e2e_test feat(core): drop support for Node.js 12 (#45286) 2022-03-08 12:05:03 -08:00
src feat(forms): Implement strict types for the Angular Forms package. (#43834) 2022-04-12 17:37:04 +00:00
BUILD.bazel build: switch playground examples to bazel (#28490) 2019-02-04 16:51:11 -05:00
favicon.ico build: adding basic e2e testing infrastructure 2016-05-02 08:15:10 -07:00
README.md build: switch playground examples to bazel (#28490) 2019-02-04 16:51:11 -05:00
systemjs-config.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
systemjs-rxjs-operators.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build.json build: switch playground examples to bazel (#28490) 2019-02-04 16:51:11 -05:00
tsconfig-e2e.json build: run playground e2e examples with bazel (#28490) 2019-02-04 16:51:11 -05:00

How to serve the examples

All playground examples are built and served with Bazel. Below is an example that demonstrates how a specific example can be built and served with Bazel:

# e.g. src/zippy_component
yarn bazel run modules/playground/src/zippy_component:devserver

# e.g. src/upgrade
yarn bazel run modules/playground/src/upgrade:devserver