36729 Commits

Author SHA1 Message Date
Miles Malerba 22afbb2f36 feat(forms): add parsing support to native inputs (#66917)
Integrates native inputs with the new parseErrors API so that they can
report parse errors when the user types an un-parsable value (e.g. "42e"
in a number field).

When a user types an un-parsable value, the model does not update. It
retains its previous value and a parse error is added for the control
that received the un-parsable value.

PR Close #66917
2026-02-13 12:11:06 -08:00
Miles Malerba 27397b3f4f fix(forms): clear parse errors when model updates (#66917)
Changes `parsedErrors` to a `linkedSignal` based on the model value.
This ensures that the parse errors are reset if the model changes from
outside the control.

PR Close #66917
2026-02-13 12:11:06 -08:00
Cameron Smick 2d9987869b refactor(devtools): Add a new childSignalProp DebugSignalGraphNode kind to represent a signal being passed to a child component as a prop.
The purpose for this change is to add nodes to the signal graph to make it clear when producer nodes, especially those that aren't consumed in the component being inspected, are passed to child components for consumption.
2026-02-13 10:09:59 -08:00
marktechson 29a17ed791 docs: Adds new agent skills to Angular
The first agent skill is a workflow for building a new Angular app from scratch. Using this skill agents will use Angular tooling for code generation where appropriate. Also includes important hints.
2026-02-13 10:07:54 -08:00
SkyZeroZx e10a63453d refactor(compiler-cli): use phaseModifier for type-only import detection
The `isTypeOnly` property was deprecated in TypeScript and replaced by `phaseModifier`.

Updates the check to use `phaseModifier`, which is the recommended API for detecting type-only imports.

Additionally, removes the unused `metadata` parameter from the `NgModuleExtractor`
2026-02-13 09:42:48 -08:00
Matthieu Riegler 5f6088da3a refactor(language-service): split tests into multiple targets
The helps with fighting flakiness
2026-02-13 09:42:05 -08:00
Matthieu Riegler 6e0d783e5b refactor(compiler): Add info about unclosed element.
We chose to throw 2 errors here because we can't assume the intention of the developer and the span we target are different.

fixes #57032
2026-02-13 09:41:37 -08:00
Matthieu Riegler 08ea105aa3 refactor(platform-server): split zone/zoneless tests.
The Zone tests are a subset of tests that we still using the Zone CD provider.
2026-02-13 09:41:10 -08:00
cexbrayat 63d8005703 fix(forms): preserve custom-control focus context in signal forms
Fixes #67051

Store custom control focus callbacks in a wrapper so method invocation keeps the original object context. Without this, custom focus methods that access instance members throw at runtime when focusBoundControl() is called.
2026-02-13 09:37:19 -08:00
Matt Lewis 0806ee3826 fix(core): prevent animated element duplication with dynamic components in zoneless mode
When using ViewContainerRef to rapidly toggle animated elements in
zoneless mode (e.g. CDK Overlay menus), multiple copies of the element
could appear in the DOM. This happened because leave animations were
queued but not yet executed, and the existing `cancelLeavingNodes`
mechanism could not find the leaving element to cancel it — it ran
during template execution before the new element was in the DOM, and
used the declaration container's anchor which doesn't work for
overlay/portal patterns where elements are moved to separate
containers.
2026-02-13 09:35:08 -08:00
hawkgs 83da928206 fix(devtools): injector tree errors when inspecting null nodes
Due to explicit injector type checks, inspecting nodes that have type !== `environment` but at the same time are rendered in the Environment Injector tree, opening their details used to break the app. This change fixes this.
2026-02-13 09:33:37 -08:00
Angular Robot dfd5e3a90a build: update pnpm to v10.29.3
See associated pull request for more information.
2026-02-13 09:18:58 -08:00
Angular Robot d0038235d5 build: update bazel dependencies
See associated pull request for more information.
2026-02-13 09:18:32 -08:00
Jef 3cad0d644e docs: Clarify sentence in attribute-directives.md 2026-02-13 09:16:45 -08:00
Matthieu Riegler d5b35b1826 refactor(core): place Eager value first
This way the jsdoc wouldn't collapse if/when we remove the `Default` value.
2026-02-12 17:29:30 -08:00
SkyZeroZx ddfc833df9 refactor(common): improve image directive typings
Add image directive typings to improve type safety and removes an unused parameter from the observer registration.
2026-02-12 16:51:51 -08:00
Angular Robot 5b59dbd36f build: lock file maintenance
See associated pull request for more information.
2026-02-12 10:18:03 -08:00
Matthew Beck 06d94ac0ca Revert "refactor(compiler): Add info about unclosed element."
This reverts commit 097208454b.
2026-02-12 09:30:57 -08:00
Matthieu Riegler 097208454b refactor(compiler): Add info about unclosed element.
We chose to throw 2 errors here because we can't assume the intention of the developer and the span we target are different.

fixes #57032
2026-02-12 08:55:20 -08:00
Matthew Beck b386f95bd0 Revert "refactor(compiler): Add info about unclosed element."
This reverts commit 9b69e29603.
2026-02-12 08:54:40 -08:00
Matthieu Riegler 9b69e29603 refactor(compiler): Add info about unclosed element.
We chose to throw 2 errors here because we can't assume the intention of the developer and the span we target are different.

fixes #57032
2026-02-12 07:58:06 -08:00
Miles Malerba 62453330f5 build: add workspace rule for antigravity
Antigravity does not support AGENTS.md, instead it has "workspace rules" (antigravity.google/docs/rules-workflows). This commit adds a symlink for the workspace rule.
2026-02-11 15:23:05 -08:00
Miles Malerba d75046bc09 fix(forms): warn when showing hidden field state
In signal forms, it is up to the user to guard hidden fields from being
rendered in the template. To help catch instances where it is
accidentally not guarded, this commit introduces a warning in dev mode.
2026-02-11 14:46:43 -08:00
Matthieu Riegler 17f19272c1 refactor(core): replacing usages of Default strategy with Eager
This will allow us to remove the `Default` value in g3.
2026-02-11 14:40:49 -08:00
Matthieu Riegler 302ea2ee46 fix(devtools): scope the message bus with URLs to prevent cross message interference
This prevents us from having detectAngular from running indefinitely.
2026-02-11 14:38:33 -08:00
Georgi Serev ece827e269 feat(devtools): add dependencies highlighting to the signal graph
Add ability to highlight the upstream and downstream dependencies path via the node details.
2026-02-11 14:37:51 -08:00
Angular Robot f67818a0ea docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-02-11 14:09:58 -08:00
Jessica Janiuk 4937d162f5 ci: update pullapprove reviewer list
This cleans up the pullapprove reviewers.
2026-02-11 14:00:01 -08:00
Matthieu Riegler 7b5bcbf401 build: add node type for api extraction
Without this the node types are `any`.

fixes #67027
2026-02-11 13:57:58 -08:00
Angular Robot a4fceda35b build: update pnpm to v10.29.2
See associated pull request for more information.
2026-02-11 13:40:49 -08:00
Miles Malerba 50e74add52 build: add skills in antigravity
Adds a symlink `.agent/skills` to `.gemini/skills`. This will allow
antrigravity which searches under `.agent` to see them.
2026-02-11 13:39:52 -08:00
Charles Lyding 4999868d8d build: migrate integration tests to manual Protractor setup
Removes the use of the private Protractor builder (`@angular-devkit/build-angular:private-protractor`)
from all integration test projects. Projects that still require E2E tests
now invoke Protractor directly via NPM scripts using `concurrently` to
manage the development server.
2026-02-11 13:38:55 -08:00
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 v21.2.0-next.3 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