Commit graph

36863 commits

Author SHA1 Message Date
Andrew Scott
dd58c4b667 refactor(common): Add token to indicate whether precommit handler is supported
This commit adds a token that indicates whether the precommitHandler feature
is supported by the navigation api.

https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/intercept#precommithandler
2026-01-06 16:10:56 -05:00
Alan Agius
91dc91bae4
fix(core): sanitize sensitive attributes on SVG script elements
This commit updates the DOM security schema and sanitization logic to properly recognize and sanitize `href` and `xlink:href` attributes on SVG `<script>` elements.
2026-01-06 15:49:52 -05:00
Angular Robot
e2e5b66726 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-06 15:29:27 -05:00
Leon Senft
82a2de201f refactor(forms): bind native properties on interop controls
The framework will now bind all field state properties to their
corresponding native properties (if any) on interop form controls (those
using `ControlValueAccessor`), excluding those handled explicitly by
`ControlValueAccessor` such as `disabled`.
2026-01-06 13:12:17 -05:00
Leon Senft
15bddbdcda refactor(forms): bind field properties to all directives on interop controls
The framework will now bind the field state properties to all matching
directive inputs on form controls using Reactive Forms'
`ControlValueAccessor`.
2026-01-06 13:12:17 -05:00
Leon Senft
0c8f15d546 refactor(forms): bind field properties to all directives on custom controls
The framework will now bind the field state properties to all matching
directive inputs on custom form controls.
2026-01-06 13:12:17 -05:00
Leon Senft
c149f47ef6 refactor(forms): bind field properties to all directives on native controls
Since the `Field` directive manages binding `FieldState` properties to
the underlying form control automatically, the type checker prohibits
explicit bindings to the same properties to avoid conflicts. This proved
problematic in cases where developers wanted to bind these properties to
the inputs of other directives on form controls. Now the framework will
bind the field state properties to all matching directive inputs on
native controls.

Fix #65617
2026-01-06 13:12:17 -05:00
Andrew Scott
39efb62c0f fix(router): Ensure createUrlTree does not reuse segments of input
Mutating the `UrlTree` that is returned by `createUrlTree` can cause the
input, which might even be an active route, to be mutated. This ensures
the `UrlSegment`s are recreated and do not mutate the input.

fixes #54624
2026-01-06 13:11:54 -05:00
Kristiyan Kostadinov
10da2f9029 fix(compiler): better types for a few expression AST nodes
We had `any` types for `LiteralArray.expressions`, `Chain.expressions`, `BindingPipe.args`, `LiteralPrimitive.value` and `LiteralMap.values`. These changes add proper types to them.
2026-01-06 12:16:28 -05:00
Shuaib Hasan Akib
b93d5ec27a docs(forms): add documentation links to Signal Forms API
Add @see JSDoc tags to Signal Forms API functions and classes to link to the essentials guide and detailed documentation pages. This improves discoverability of Signal Forms documentation from the API reference.
2026-01-06 10:34:46 -05:00
hawkgs
f05d0feac9 fix(devtools): injector tree initial root node snapping on prod
Fix initial broken root node snapping/focusing when the Injector Tree tab is opened in the production app.
2026-01-06 10:22:29 -05:00
hawkgs
4b7f7a550f fix(devtools): retain tree-viz snapped node on pre-render cleanup
Each tree-visualizer render cycle resets the snapped node in an effort to not end up with a non-existent snapped node. However, each render cycle doesn't constitute a completely different tree. This change retains the snapped node as long as it exists in the tree.
2026-01-06 10:22:29 -05:00
hawkgs
2d9e179188 perf(devtools): improve injector tree rendering performance
Introduce an equality function for transformed injector trees in order to omit redundant D3 tree visualization render cycles when the tree hasn't been changed.
2026-01-06 10:22:29 -05:00
Angular Robot
de43806a2e build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-06 10:20:03 -05:00
Andrew Scott
db470f0881 refactor(router): Remove internal rxjs recognize implementation
All uses of this have been removed internally and it's no longer needed
2026-01-06 10:13:19 -05:00
Matthieu Riegler
71cde39ff0 docs: rewrite testing docs
Those rewrites focus on using Vitest instead of jasmine, drop usages of `fakeAsync`, present modern testing strategy that rely on `whenStable` more than explicit calls to `detectChanges`.

fixes #42748, #48510, #64962, #65987, #66029,  #66150
2026-01-05 19:38:23 -05:00
Shuaib Hasan Akib
456ca35906 docs(forms): fix duplicate validator reference titles in AbstractControl
The removeValidators and hasValidator methods both had identical "Reference to a ValidatorFn" section titles, causing duplicate entries in the API documentation table of contents.
2026-01-05 19:26:31 -05:00
Angular Robot
9184146529 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-05 17:35:48 -05:00
Andrew Scott
df2aaaaede docs(vscode-extension): Update developer docs to match current setup
developer docs needed an update after moving to the angular/angular repo
2026-01-05 17:01:49 -05:00
Andrew Scott
1bf1e7e2a7 refactor(vscode-extension): Use v999 when version is 0.0.0
0.0.0 is the version in the local repo when building from sources. Update the
extension to see this as some arbitrarily large version so it uses the most recent features
2026-01-05 17:01:49 -05:00
Andrew Scott
2ff718869f refactor(vscode-extension): Remove pre-19 integration project
This updates the pre-v19 integration test to use the regular integration
project but pass a specific version and update file contents as
necessary to excersise the code path that uses the default standalone
value. This allows us to remove the old project from the workspace,
allowing the language service to use more recent versions when working
with the adev project, for example.
2026-01-05 17:01:49 -05:00
SkyZeroZx
1532be9d00 refactor(core): introduce tree-shakeable runtime error codes for NgModule handling and ViewContainerRef errors
Adds new tree-shakeable runtime error codes to improve error reporting for
NgModule resolution issues (duplicate or missing IDs) and invalid ViewContainerRef
operations involving destroyed views.
2026-01-05 16:52:24 -05:00
cexbrayat
46a276ac9c docs: update MCP devserver tool names to use dot notation
This updates the documentation to match the changes in angular-cli:
- dot notation for tool names: 18d74dde89
- tool group support for devserver: 427c3a9332
2026-01-05 15:58:22 -05:00
SkyZeroZx
a6b8cb68af feat(common): support custom transformations in ImageKit and Imgix loaders
Adds a `transform` parameter for ImageKit and Imgix image loaders.
2026-01-05 15:50:13 -05:00
Angular Robot
14f5cc4e9b docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-01-05 15:26:39 -05:00
Matthieu Riegler
15308149db docs(docs-infra): Add package filter to the API list
This commit also introduces the usage of signal forms on adev
2026-01-05 15:21:33 -05:00
Andrew Scott
5edceffd04
feat(router): add controls for route cleanup
This commit introduces a new feature to automatically destroy `EnvironmentInjector`s associated with routes that are no longer active or stored. This helps in managing memory by releasing resources held by unused injectors.
2026-01-05 14:43:56 -05:00
Shuaib Hasan Akib
e6631f0007 docs(docs-infra): sync heading colors between docs and API pages
Aligns documentation heading colors across docs and API pages to ensure
visual consistency and a cohesive reading experience.
2026-01-05 12:36:58 -05:00
Charles Lyding
ab0fb1633c build(forms): setup infrastructure for code examples
This commit introduces the infrastructure for embedding code examples within Angular packages, enabling them to be consumed by the Angular CLI's MCP server.

The `@angular/forms` package is the first to adopt this new feature. A new `ng_examples_db` Bazel rule is used to build a SQLite database from markdown files containing code examples. This database is then included in the published npm package.

The `package.json` for `@angular/forms` has been updated with an `angular.examples` field to allow tooling to discover and use the code examples.
2026-01-05 12:36:00 -05:00
SkyZeroZx
ed7bfb3c88 feat(docs-infra): Extracts aliases from doc entries
Implements a mechanism to extract alias names from a directive's selector.
2026-01-05 12:33:14 -05:00
SkyZeroZx
b735c45974 docs: update tsDoc code examples to use TypeScript syntax highlighting 2026-01-05 12:31:44 -05:00
Matthieu Riegler
6a94300179 refactor(devtools): use whenStable instead of detectChanges
This commits migrates the devtools tests toward to recommendations
and runs the tests in a zoneless config
2026-01-05 12:24:58 -05:00
Angular Robot
821d5652b0 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-05 12:17:15 -05:00
SkyZeroZx
b1a0d1d8e2 docs: Add form control state management and event options 2026-01-05 12:16:09 -05:00
SkyZeroZx
c1d72af10d docs(docs-infra): add external link styles to API reference documentation
Adds the missing icon external link styling to the API reference documentation.
2026-01-05 12:14:31 -05:00
SkyZeroZx
fa430bffb0 docs: add @see links to API docs for better discoverability 2026-01-05 12:12:24 -05:00
SkyZeroZx
712d8f41e8 refactor(router): Simplifies unsubscribe logic
Uses optional chaining to simplify unsubscribe handling.
Also improving tree-shaking by limiting injector names to route paths using `ngDevMode`
2026-01-05 12:08:08 -05:00
SkyZeroZx
a9283ca93a docs: add section on converting writable signals to readonly 2026-01-05 12:03:11 -05:00
Shuaib Hasan Akib
bcaa001cac docs: fix incorrect Input import in example
Update the documentation example to import input instead of Input,
ensuring the code reflects the signal-based API and current Angular
recommendations.
2026-01-05 12:02:16 -05:00
Shuaib Hasan Akib
8358e548ce fix(docs-infra): stop auto-linking "state" and "group" to APIs
Prevents common words used in code examples from being incorrectly
linked to API references.

Fixes: #66292
2026-01-05 12:01:51 -05:00
SkyZeroZx
5d3708e5ed docs: prevent mobile overflow in the route behavior customization example 2026-01-05 12:00:59 -05:00
Logan Mzz
ef48826dc7 docs: fix reference to parent from children resolvers 2026-01-05 11:55:53 -05:00
Kirill Cherkashin
4a8ad92cee docs(forms): update migration guide (#66111)
PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs
d8e3bcff5e docs(forms): Address feedback (#66111)
Update `Automatic status class` section

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs
25f6441a10 docs(forms): Address feedback (#66111)
Update the Automatic status classes section to make NG_STATUS_CLASSES go first.

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs
c41bb1b8ec docs(forms): Address feedback (#66111)
Change wording and formatting and clean up.

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs
8b57bcdf3d docs(forms): Add a section for automatic form binding (#66111)
To avoid manually adding classes like `.ng-valid`, `.ng-dirty` etc to every field, you can provide a global configuration using `provideSignalFormsConfig`.

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs
57193c5c2a docs(forms): add a Accessing values section (#66111)
This explains how to get the value of a compat form

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs
d62734842a docs(forms): add migration guide for Signal Forms (#66111)
This commit introduces a new guide for migrating from legacy forms (Reactive and Template-driven) to the new Signal Forms.

PR Close #66111
2026-01-05 11:54:43 -05:00
SkyZeroZx
a5ebdd9cd1 docs(docs-infra): Fixes the visibility of the copy link button in CLI headings
Fixes the visibility of the copy link button in CLI documentation headings.
2026-01-05 11:52:24 -05:00