Commit graph

35680 commits

Author SHA1 Message Date
Joey Perrott
eebcaf49f1 ci: use defined ng-dev config for deploying docs site
Use the repo defined ng-dev configuration for deploying the docs site
2025-12-03 11:26:05 -08:00
Shuaib Hasan Akib
7f8ffa3304 fix(docs-infra): prevent readonly TypeScript keyword from being linked
This updates the docs infrastructure to avoid incorrectly linking the `readonly` keyword in TypeScript examples.

Fixes #65632
2025-12-03 16:30:51 +01:00
Pawel Kozlowski
13c0d451a5 release: cut the v21.1.0-next.1 release 2025-12-03 16:24:33 +01:00
Pawel Kozlowski
ffd7a9b7ea docs: release notes for the v21.0.3 release 2025-12-03 16:20:28 +01:00
SkyZeroZx
7d1e502345 feat(forms): Allows transforms on FormUiControl signals
Extends the `FormUiControl` interface to allow `InputSignalWithTransform` in addition to `InputSignal` for its properties.

Fixes #65756
2025-12-03 15:13:01 +01:00
Leon Senft
e6d5632a30 perf(core): tree shake unused dynamic [field] binding instructions (#65599)
Move the instructions used to dynamically bind a `Field` directive to a
form control onto the `Field` itself. This way the instructions are only
retained if the app uses the `Field` directive.

PR Close #65599
2025-12-03 15:10:49 +01:00
Leon Senft
cd7ae7e2ce fix(forms): support dynamic [field] bindings (#65599)
Support binding a `Field` directive to a component created dynamically
with `createComponent()`.

Fix #64632

PR Close #65599
2025-12-03 15:10:49 +01:00
Kristiyan Kostadinov
886cf6c452 fix(core): unable to inject viewProviders when host directive with providers is present
When registering providers, the DI system assumes that `viewProviders` are registered before plain `providers`. This was reinforced by components always being first in the array of directive matches, only one component being allowed per node and the fact that only components can have `viewProviders`.

This breaks down if there are host directives with `providers` on the component, because they'll execute earlier, throwing off the order of operations.

These changes fix the issue by separating out the resolvers for `viewProviders` and plain `providers` and explicitly running the component's `viewProviders` resolver before any others. This also has the benefit of not attempting to resolve `viewProviders` for directives which are guaranteed not to have them.

Fixes #65724.
2025-12-03 15:09:48 +01:00
Angular Robot
d6087841e3 build: update all github actions
See associated pull request for more information.
2025-12-03 14:08:09 +01:00
Angular Robot
dfd7d3bf6b build: lock file maintenance
See associated pull request for more information.
2025-12-03 13:38:40 +01:00
Alan Agius
3e89577655 release: bump Angular DevTools version to 1.6.2 2025-12-03 13:18:27 +01:00
Alan Agius
0659d11c85
fix(http): enable XSRF protection for same-origin absolute URLs
Previously, the XSRF interceptor only added the XSRF token to requests with relative URLs.
This commit updates the interceptor to also add the token to requests with absolute URLs, provided they match the current origin.
2025-12-03 12:19:43 +01:00
Kristiyan Kostadinov
6773d3b97d fix(compiler-cli): check that field radio button values are strings
Adds some type checking code which verifies that the bound `value` on a `Field` radio button is a string.

Fixes #65726.
2025-12-03 12:18:57 +01:00
arturovt
b74a0693f2 fix(router): handle errors from view transition finished promise
This commit adds a `.catch()` handler to `transition.finished` from `document.startViewTransition` to prevent unhandled promise rejections. The finished promise can reject with `TimeoutError` or `InvalidStateError` when transitions fail during or after the animation phase.

Based on the Blink source code, the `finished` promise can reject with:
* `TimeoutError`: "Transition was aborted because of timeout in DOM update"
* `InvalidStateError`: "Transition was aborted because of invalid state"

This may happen when the DOM update phase exceeds the browser's internal timeout threshold.
2025-12-03 12:16:57 +01:00
Joey Perrott
819b640c2d docs: prevent showing typescript diagnostic errors until the node runtime reaches a ready state
Prevent the overlay box showing diagnostics errors until after the initial setup of the node runtime is completed.

Fixes #52649
2025-12-03 11:54:53 +01:00
Pawel Kozlowski
13353bff8b Revert "build: update cross-repo angular dependencies"
This reverts commit 64f1f60943.
2025-12-03 11:06:54 +01:00
Pawel Kozlowski
b158acb95c Revert "build: update bazel dependencies"
This reverts commit e26aa86aa5.
2025-12-03 11:06:54 +01:00
Angular Robot
e26aa86aa5 build: update bazel dependencies
See associated pull request for more information.
2025-12-03 10:13:47 +01:00
Joey Perrott
64f1f60943
build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-03 10:10:11 +01:00
hawkgs
a5efc35ddf fix(devtools): router tree callables view source functionality
Fix a set of issues with the callable search algorithm and refactor it.
2025-12-03 10:07:20 +01:00
Joey Perrott
34bedae101 docs: rename visibleRegion to region
Use the attribute region instead of visibleRegion
2025-12-03 10:06:01 +01:00
Joey Perrott
9b3b5fb4cf refactor(docs-infra): extract only the visibleRegion
Previously we extracted the regions and only made the visible region visible on the page, but since there is not a need for the
non-visible code to be presented, we don't need to include it in the generated code snippets.
2025-12-03 10:06:01 +01:00
Alon Mishne
a892f2824c docs: Add build and devserver tools to MCP docs 2025-12-03 10:04:37 +01:00
Kirill Cherkashin
29223c440f docs: Update adev/src/content/guide/forms/signals/models.md
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-12-02 19:30:52 +01:00
kirjs
1fd8303659 docs(forms): Polish the docs
- Recommend using form/fields to set the value
- Drop "Dynamic field addition" section as for the above reason
2025-12-02 19:30:52 +01:00
Andrew Scott
a0ad5d4b2b test(router): Add tests for support of path params before/after a wildcard
This adds additional tests following the initial implementation in #64737 that cover
the use-case of path parameters before and after the wildcard segment.
2025-12-02 16:46:17 +01:00
Andrew Scott
fd65dc5d53 refactor(router): add comment about scroll/focus
Add consideration for future behavior in the completion of the navigation event.
2025-12-02 16:45:17 +01:00
Andrew Scott
cc03254b12 refactor(router): Avoid aborting traversal navigations
Unnecessarily aborting traversal navigations will break focus and scroll
restoration. We need to keep them open rather than replacing them with
an identical router-initiated navigation.
2025-12-02 16:45:17 +01:00
Andrew Scott
9914926b0d refactor(router): Clean up cancellation event handling
cleans up some handling of cancellation events with a shared helper.
2025-12-02 16:45:17 +01:00
Andrew Scott
b7d21e209a refactor(router): compress synchronous end to router navigation to single operator
The end of the Router navigation is a block of synchronous logic that
can be compressed into a single operator rather than splitting it across
several, making it harder to step through. The only benefit from the
split is automatic unsubscribe/cancellation, which we can replicate
with an additional 'shouldContinue' check before proceeding.
2025-12-02 16:44:01 +01:00
Kristiyan Kostadinov
e30e61b789 fix(compiler-cli): avoid allocating an object for signals in production mode
Currently when the signal debug name transform sees something like `const foo = signal(0);`, it transforms the signal into `signal(0, {...(ngDevMode ? { debugName: 'foo' } : {})})`. After minification this becomes `signal(0, {})` which will allocate memory for the empty object literal.

These changes rework the logic to produce `signal(0, ...(ngDevMode ? [{ debugName: 'foo' }] : []))` which will be fully tree shaken away to `signal(0)`.
2025-12-02 15:06:51 +01:00
Jessica Janiuk
d8ab83ca82 fix(core): run animation queue in environment injector context
In the case that a component injector is destroyed before the animation
queue runs, the animation queue would fail to run because it was using a
destroyed injector. This commit changes the animation queue to run in the
context of the EnvironmentInjector, which is not destroyed until the app
is destroyed.

fixes: #65628
2025-12-02 15:05:17 +01:00
Matthieu Riegler
f35b2ef47c refactor(compiler): Generate the controlCreate instruction after the native element has been created
This is necessary to exclude a race condition where the MutationObserver initialized by the instruction fired before the inputs are binded.

fixes #65678
2025-12-02 12:59:49 +01:00
Matthieu Riegler
a784995a98 docs(docs-infra): Show examples on function overloads 2025-12-02 12:13:11 +01:00
Angular Robot
19a36954c1 build: update dependency chokidar to v5
See associated pull request for more information.
2025-12-02 12:11:10 +01:00
Angular Robot
510151c152 build: update all non-major dependencies
See associated pull request for more information.
2025-12-02 12:06:55 +01:00
Georgi Serev
2eaa4d54ad
fix(devtools): hide profiler node details when the frame is changed
Hide the details panel when the user selects a new frame.
2025-12-02 12:05:54 +01:00
Joey Perrott
a16a70ca74 refactor(docs-infra): move header id tracking into RendererContext
Move the header id tracking into the renderer context rather than a global state.  Since the RendererContext is
initialized for each execution of the marked parser, we can store the context of which header ids have been seen within
a single page there which allows us to run these parse interactions in parallel.
2025-12-02 12:03:34 +01:00
Joey Perrott
8b296543ae refactor(docs-infra): transform all headings using the built in transformer
Rather than manually calling the transformer we use for headings from within a render function, we now properly call into the Renderer to do them
via the tokens they are require instead.  This is being done to allow us to have a per Renderer instance of state instead of a global state, which will
allow us to run marked async and hopefully speed up the pipeline
2025-12-02 12:03:34 +01:00
Tim Deschryver
680de24c3c docs: fix documentation link for currentNavigation method 2025-12-02 12:02:24 +01:00
SkyZeroZx
0c7508bf56 docs: add platform-specific implementation and helpers 2025-12-02 12:00:01 +01:00
Angular Robot
c5a3bbbd91 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-02 10:48:06 +01:00
SkyZeroZx
03c04d4c83 docs: improve formatting and fixed numeration issue in attribute directives guide 2025-12-02 10:45:47 +01:00
SkyZeroZx
7fd5890d48 docs: update syntax highlighting in component documentation 2025-12-02 10:38:16 +01:00
Gaston
da99b5d1d0 docs: add FormArrayDirective documentation to reactive forms guide
Update adev/src/content/guide/forms/reactive-forms.md

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-12-02 10:36:13 +01:00
Matthieu Riegler
bc93b398af docs: fix submit example
`async` keyword is required for the `submit` callback
2025-12-02 10:35:06 +01:00
Angular Robot
71b613177f build: update pnpm to v10.24.0
See associated pull request for more information.
2025-12-01 19:54:46 +01:00
SkyZeroZx
aea2465a59 docs: update notes to use consistent formatting in various guides 2025-12-01 19:33:32 +01:00
Angular Robot
4e1d1ec85c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-01 19:32:28 +01:00
Alan Agius
25bf417d57 ci: include dev-app files from pullapprove checks
At dev-app to pullaprove
2025-12-01 19:24:22 +01:00