Commit graph

36397 commits

Author SHA1 Message Date
Leon Senft
3606902b33
refactor(forms): relax [formField] input type from FieldTree to Field
`FieldTree` was an unnecessarily specific type for the `[formField]`
input. It forced the directive to care about what _kind_ of `FieldTree`
was bound–specifically whether it was Reactive Forms compatible or not.
This made it difficult to author forms system-agnostic components with
passthrough `[formField]` inputs.
2026-02-11 11:45:20 -08:00
Andrew Kushnir
39cff9c235 release: cut the v21.2.0-next.3 release 2026-02-11 09:58:38 -08:00
Andrew Kushnir
ad815106dd docs: release notes for the v21.1.4 release 2026-02-11 09:51:23 -08:00
Miles Malerba
ba009b6031
feat(forms): add form directive
Adds a `formRoot` directive to manage submitting the form in signal
forms.
2026-02-10 14:34:48 -08:00
Matt Lewis
bd2868e915 fix(core): capture animation dependencies eagerly to avoid destroyed injector
Animation runner functions (runEnterAnimation, runLeaveAnimations,
runLeaveAnimationFunction) execute asynchronously from the animation
queue via afterNextRender. By that time the lView injector may have
been destroyed, causing lView[INJECTOR].get(NgZone) to throw NG0205.

Move the NgZone and MAX_ANIMATION_TIMEOUT lookups into the setup
instructions (ɵɵanimateEnter, ɵɵanimateLeave, ɵɵanimateLeaveListener)
which run synchronously during template processing when the injector
is guaranteed to be valid, and pass them through the closures.
2026-02-10 13:31:23 -08:00
Weddly Rodrigues
c6ca1cd725 docs: rename loadUser mock API to getUserData 2026-02-10 13:30:44 -08:00
Matthieu Riegler
e229328b39 test: add test about mapped attributes to input
The dynamic component has `[value]` in its selector and this has always been reflected as a DOM attribute on the dynamically created host element, which is now also synced into the component instance.

fixes #60157
2026-02-10 13:29:31 -08:00
Charles Lyding
8b4eec6683 docs: remove legacy e2e configuration from i18n example
Removes the unused 'e2e' configuration block using '@angular-devkit/build-angular:private-protractor' from the i18n example configuration.
2026-02-10 13:28:48 -08:00
Miles Malerba
18003a33bb feat(common): add an 'outlet' injector option for ngTemplateOutlet
Adds an option (`ngTemplateOutletInjector="outlet"`) that instructs the ngTemplateOutlet to inherit its injector from the outlet's place in the instantiated DOM.
2026-02-10 09:42:50 -08:00
Miles Malerba
a7e8abbb7e fix(core): correctly handle SkipSelf when resolving from embedded view injector
The `SkipSelf` flag is intended for the current injection context. When delegating to an embedded view injector, we are traversing to a parent/fallback scope, so the 'Self' has already been skipped.
2026-02-10 09:42:50 -08:00
Matthieu Riegler
4f8d3995f0 fix(vscode-extension): Highlight function calls with optional chaining
eg: `foo?.()` should be highlighted as `foo()`.

fixes #65513
2026-02-10 09:42:03 -08:00
Charles Lyding
387793fe29 build: remove unused Protractor E2E target from legacy-animations
Removes the `e2e` architect target from the `legacy-animations` integration test
project as it does not have actual E2E tests and was using a placeholder script.
2026-02-10 09:41:26 -08:00
Charles Lyding
15fc190556 test: remove unused Protractor E2E targets from integration tests
Removes the `e2e` architect target from several integration test projects
that do not have Protractor as a dependency and are not executing E2E tests.

Affected projects:
- cli-hello-world
- cli-hello-world-lazy
- defer
- legacy-animations-async
- standalone-bootstrap
2026-02-10 09:41:26 -08:00
SkyZeroZx
0f47fda51b test(router): move timeout and autoTick helpers to shared testing utilities
Centralizes common test helpers under testing utilities and updates usages
2026-02-10 07:45:00 -08:00
SkyZeroZx
19d0ceede3 test(forms): move timeout and autoTick helpers to shared testing utilities
Centralizes common test helpers under testing utilities and updates usages
2026-02-10 07:45:00 -08:00
SkyZeroZx
0c6eb60c86 test(http): remove zone-based testing utilities
Removes usages of zone-based helpers as part of the migration to zoneless tests.

Completes the transition to zoneless.
2026-02-10 07:45:00 -08:00
SkyZeroZx
8b3b069be7 refactor(forms): use optional chaining for safer method calls in form directives
Simplifies null checks by leveraging optional chaining when invoking
optional callbacks
2026-02-10 07:42:56 -08:00
SkyZeroZx
e7fa177923 refactor(compiler-cli): removes reflector parameter from wrapTypeReference
The `wrapTypeReference` function no longer needs the `reflector` because it only uses the `clazz` parameter to create a `WrappedNodeExpr`.
2026-02-10 07:42:25 -08:00
Matthieu Riegler
760910ecf1 Revert "refactor(service-worker): remove zone-based testing utilities"
This reverts commit 12b770d  (on top of the partial revert of #66978)
2026-02-09 15:52:26 -08:00
SkyZeroZx
51cc914807 feat(common): support height in ImageLoaderConfig and built-in loaders
Introduces an optional `height` property in `ImageLoaderConfig`, allowing
built-in image loaders to generate URLs with explicit height parameters.
This improves layout control and enables better support for loaders that
require height-based transformations.

Closes #51723
2026-02-09 14:51:04 -08:00
Miles Malerba
f56bb07d83 feat(forms): add field param to submit action and onInvalid
The `action` and `onInvalid` handlers now recevie two pieces of
information:
1. The form that is being submitted
2. The specific field that the submit was triggered on

Remove the `submit()` method on field state - supporting this is complex
from a typing perspective, since the `FieldState` only knows its
`TValue` type, not the `TModel` type of its owning `FieldTree`. Rather
than try to pack additional generics on to `FieldState`, we'll just
leave the `submit` function as a standalone importable function.
2026-02-09 14:49:43 -08:00
Jaime Burgos
c6d7500203
test(common): remove zone-based testing utilities
Removes usages of zone-based helpers such as `fakeAsync` , `tick`
`waitForAsync` as part of the migration to zoneless tests.

Completes the transition to zoneless.
2026-02-09 14:47:35 -08:00
Jessica Janiuk
e53c8abaf9 fix(core): Fix flakey test due to document injection
This fixes the test issues with the transfer state by using the DOCUMENT from src/document.
2026-02-09 14:16:24 -08:00
SkyZeroZx
cb1163e5e5 fix(http): correctly parse ArrayBuffer and Blob in transfer cache
Encodes arraybuffer and blob response bodies as base64 when storing in the transfer cache, ensuring correct retrieval and usage on the client side.

Fixes #66827
2026-02-09 12:32:12 -08:00
Leon Senft
b772f518f1 refactor(forms): add fieldTree property to FieldState
The `fieldTree` property of `FieldState` returns its associated
`FieldTree`.

Note that the round trip from `FieldTree` to `FieldState` and back will
lose type information. This is because `FieldState` intentionally does
not know whether it came from a pure Signal Forms field tree, or a
Reactive Forms compatible field tree:

```ts
// Pure Signal Forms:
const x: FieldTree<string>;

x();           // FieldState<string>;
x().fieldTree; // FieldTree<unknown>

// Reactive Forms compatibility:
const y: FieldTree<FormControl<string>>;

y();            // FieldState<string>;
y().fieldTree;  // FieldTree<unknown>;
```
2026-02-09 12:28:35 -08:00
Miles Malerba
adfb83146b
fix(forms): simplify design of parse errors
Reoves the `parseErrors` property on `FormUiControl` and instead
introduces a new utility `transformedValue` that automatically handles
synchronizing the raw value and model value using the given `parse` and
`format` functions. It also automates the reporting of `parseErrors` to
the `FormField`, simplifying the API surface
2026-02-09 12:27:41 -08:00
SkyZeroZx
f50ec42f15 refactor(forms): guard unsupportedFeatureError with ngDevMode
Move unsupportedFeatureError message behind ngDevMode
to keep it dev-only and allow proper tree-shaking.
2026-02-09 12:26:35 -08:00
SkyZeroZx
66e8385b6a refactor(common): extract argument assertion
Deduplicates string argument validation logic across pipes
by introducing a local assertion helper
2026-02-09 12:26:06 -08:00
Kristiyan Kostadinov
11834a4274 fix(compiler): add geolocation element to schema
A new `geolocation` tag was recently added to Chrome. These changes update the schema to account for it.

See https://developer.chrome.com/blog/geolocation-html-element
2026-02-09 12:25:37 -08:00
moraisacr
d940885c5b docs(forms): replace 'legacy' with 'reactive' in migration guide and navigation
Updates terminology from 'Legacy Forms' to 'Reactive Forms' in:
- Migration guide documentation
- Navigation entries label

Fixes #66957
2026-02-09 12:24:03 -08:00
hawkgs
c32e732d3d fix(devtools): runtime error when a cluster preview node is missing
Fix the runtime error produced when a cluster preview node is missing triggered during a signal update.
2026-02-09 12:23:17 -08:00
Alan Agius
d019ee3c0b ci: add myself to pull approve dev-infra reviewers
Add myself to the dev-infra reviewers.
2026-02-09 12:22:18 -08:00
Angular Robot
20a24631a4 build: update pnpm to v10.29.1
See associated pull request for more information.
2026-02-09 12:21:19 -08:00
SkyZeroZx
dd15efb7c3 docs(docs-infra): fix heading ID generation and display
Ensures that custom heading IDs are properly handled
2026-02-09 12:20:13 -08:00
SkyZeroZx
fd293d3397 docs: add missing error codes to the error overview list 2026-02-09 12:19:39 -08:00
SkyZeroZx
0b9d1cfb7b docs(docs-infra): simplify external link rendering for pill
Renders the external link icon for docs pills using CSS instead of a `docs-icon` component.
2026-02-09 12:19:07 -08:00
Angular Robot
11767cabe4 build: update Jasmine to 6.0.0
Jasmine enables `forbidDuplicateNames: true` by default. So we also need to desambiguate duplicate spec names.
2026-02-09 12:15:57 -08:00
Miles Malerba
85d6a2bc6e build: configure gemini cli to look for AGENTS.md
By default gemini cli looks for GEMINI.md, these settings change it to
consider AGENTS.md as well
2026-02-09 12:15:17 -08:00
Miles Malerba
7ddd10bb44 docs: add gemini custom command for generating skills
Adds a Gemini CLI custom command (`/explain`) to generate skills for
working with code packages in this repo. Usage:

1. Add skill for a new package:
  `/explain packages/common`
2. Update the skill for a package:
  `/explain Update the skill for packages/core`
3. Add supplemental information:
  `/explain Add supplemental info to the signal forms skill about how
   schema logic is implemented`

Also adds a few skills for working with some of the packages I commonly
interact with, including:

- packages/forms/signals
- packages/core
- packages/compiler-cli
2026-02-09 12:14:15 -08:00
Matthieu Riegler
4b3b149ba1 refactor(benchpress): remove zone-based testing utilities
Transition to zoneless.
2026-02-09 07:55:12 -08:00
Matthieu Riegler
ec26d38778 refactor(service-worker): remove zone-based testing utilities
Transition to zoneless.
2026-02-09 07:55:12 -08:00
Matthieu Riegler
a1441a432d refactor(compiler): remove zone-based testing utilities
Having zone.js here already wasn't necessary.
2026-02-09 07:55:12 -08:00
hawkgs
c4abadb528 fix(devtools): duplicated props in the properties panel
Fix the diff algorithm that consequentially caused the duplicated props.
2026-02-09 07:54:31 -08:00
Shuaib Hasan Akib
14f16226aa refactor(common): remove unused imports and standalone: false from examples
Cleans up example code by removing explicit `standalone: false`, since
standalone components are the default and recommended approach.
2026-02-09 07:53:31 -08:00
Shuaib Hasan Akib
0c6604f478 refactor(common): update copyright to Google LLC
Replaces outdated Google Inc copyright headers with Google LLC to align with current licensing standards.
2026-02-09 07:51:36 -08:00
aparziale
63d828aa33 docs: Signal forms custom validator with 'fieldTree' field in validation result error
Update docs for fieldTree property

fixes #66687
2026-02-06 15:10:59 -08:00
hawkgs
ce0f0febe2 refactor(devtools): add a demo resource to the demo app
Add a demo resource for testing purposes.
2026-02-06 15:09:19 -08:00
Kristiyan Kostadinov
460dbbb8e9 docs: remove non-existant method
Removes the reference to the `focusFirstItem` method since it doesn't exist.

Fixes https://github.com/angular/components/issues/32741.
2026-02-06 10:20:31 -08:00
Angular Robot
15c71fba43 build: update all non-major dependencies
See associated pull request for more information.
2026-02-06 09:44:52 -08:00
Jessica Janiuk
ea2016a6dc feat(core): add support for nested animations
Now if there's a leave animation nested within a template, those will animate before the parent element is removed. This makes animating leaving elements a bit easier than before and adds a lot more flexibility to how animations can be structured.

fixes: #66476
2026-02-06 09:42:34 -08:00