angular/packages/forms/test
Dylan Hunn f490c2de4e feat(forms): support negative indices in FormArray methods. (#44848)
This new feature allows negative indices to wrap around from the back, just like ES2021 `Array.at`. In particular, the following methods accept negative indices, and behave like corresponding Array methods:
* `FormArray.at(index)`: behaves the same as `Array.at(index)`
* `FormArray.insert(index, control)`: behaves the same as `Array.splice(index, 0, control)`
* `FormArray.setControl(index, control)`: behaves the same as `Array.splice(index, 1, control)`
* `FormArray.removeAt(index, control)`: behaves the same as `Array.splice(index, 1)`

Previous work in #44746 and #44631 (by @amitbeck).

Issue #44642.

Co-authored-by: Amit Beckenstein <amitbeck@gmail.com>

PR Close #44848
2022-01-28 16:58:29 +00:00
..
BUILD.bazel build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
directives_spec.ts test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
form_array_spec.ts feat(forms): support negative indices in FormArray methods. (#44848) 2022-01-28 16:58:29 +00:00
form_builder_spec.ts test(forms): Add more tests for FormBuilder method argument shapes. (#44452) 2021-12-14 16:11:29 -05:00
form_control_spec.ts Revert "refactor(forms): Move FormControl to an overridden exported constructor. (#44316)" (#44750) 2022-01-18 19:54:51 -08:00
form_group_spec.ts refactor(forms): use shared RuntimeError class (#44398) 2022-01-06 23:43:19 +00:00
reactive_integration_spec.ts refactor(forms): update required validator and checkbox validator to inherit abstractValidator (#44162) 2022-01-24 14:50:57 -08:00
template_integration_spec.ts refactor(forms): update required validator and checkbox validator to inherit abstractValidator (#44162) 2022-01-24 14:50:57 -08:00
util.ts refactor(forms): refactor common validators used in unit tests (#38020) 2020-07-22 20:42:43 -07:00
validators_spec.ts feat(core): support TypeScript 4.3 (#42022) 2021-06-04 11:17:09 -07:00
value_accessor_integration_spec.ts refactor(forms): Make the minimum changes to the forms unit tests in order to support the typed forms PR (#43834). (#44451) 2021-12-14 16:10:08 -05:00