Commit graph

36013 commits

Author SHA1 Message Date
cexbrayat
bb0dc8c4e0 refactor(core): typo in stability debugging warning message
untility -> utility
2026-01-07 14:44:06 -08:00
Jaime Burgos
5c75d29fb4
refactor(core): Improve tree-shakable RuntimeError error for INVALID_FIELD_DIRECTIVE_HOST
Improves the tree-shakable runtime error handling for `INVALID_FIELD_DIRECTIVE_HOST`.
2026-01-07 14:32:25 -08:00
Andrew Scott
50674f8c28 fix(vscode-extension): convert enum member kind in completions correctly
This converts enum member kinds to the correct completion kind for displa in the completions popup
2026-01-07 14:30:05 -08:00
Jan Martin
4f785f4ab1 refactor(devtools): make release script compatible with type stripping
When running this script with node directly, it requires explicit markers
for type-only imports to work.
2026-01-07 14:28:17 -08:00
Jessica Janiuk
30e9c62bdf fix(core): fix memory leak with event replay
This ensures event replay does not hold on to elements after an application has been destroyed.

fixes: #59261
2026-01-07 14:27:44 -08:00
kirjs
af4e521d64 docs: release notes for the v20.3.16 release 2026-01-07 17:20:01 -05:00
kirjs
f8db6ad3b1 docs: release notes for the v19.2.18 release 2026-01-07 17:14:07 -05:00
kirjs
414b647897 docs: release notes for the v21.0.7 release 2026-01-07 16:48:40 -05:00
Jan Martin
2c9328639f release: bump Angular DevTools version to 1.7.0 2026-01-07 13:28:29 -08:00
Matthieu Riegler
18810d8a15 build: update lock file maintenance
superseeds #66229

This also removes the dagre-d3-es patch as it was merged upstream (tbo47/dagre-es/pull/51)
2026-01-07 15:53:37 -05:00
Leon Senft
46dbd18566 refactor(forms): remove customError()
Remove the `customError` function and `CustomValidationError` type.

These were made obsolete by support for returning plain object literals
as custom errors.

This also catches few `field` properties that were missed in the
renaming to `fieldTree`.
2026-01-07 15:07:30 -05:00
arturovt
9e043decaf fix(router): handle errors from view transition updateCallbackDone promise
Firefox-specific workaround: Firefox 144+ creates the `updateCallbackDone` promise
internally during error handling (e.g., duplicate view-transition-name), even before
the property is accessed. This can cause unhandled promise rejections to appear in
error tracking tools like Rollbar/Sentry. We must attach catch handlers to all three
promises immediately to prevent these unhandled rejections.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1999336 (if applicable)
Spec: https://drafts.csswg.org/css-view-transitions-1/#dom-viewtransition-updatecallbackdone
2026-01-07 15:05:59 -05:00
Kristiyan Kostadinov
4dc5ae54a9 refactor(core): remove unused instruction parameter
The `thisArg` in pure functions isn't used so we can drop it. We still need to keep it on the underlying implementation, because pipe instructions rely on it.
2026-01-07 15:05:20 -05:00
SkyZeroZx
090484c853 docs(docs-infra): Fix combobox dialog styles for dark theme
Fixes combobox dialog styles to ensure correct text color and contrast in dark theme.
This improves readability and visual consistency when using the docs in dark mode.
2026-01-07 14:19:32 -05:00
SkyZeroZx
f9e9fc4ffe docs: enhance programmatic rendering guide by covering ngComponentOutlet options 2026-01-07 14:18:33 -05:00
Shuaib Hasan Akib
d129d201c1 docs: standardize component decorator placeholders in markdown
Updates `@Component({ ... })` to `@Component({/*...*/})` across
documentation examples for consistency and clearer formatting.
2026-01-07 14:17:38 -05:00
SkyZeroZx
8c8c5b24a1 docs(vscode-extension): update angular.io links to angular.dev in messages 2026-01-07 14:12:15 -05:00
SkyZeroZx
b2f417585a docs: update angular.io links to angular.dev in comments, TSDoc, and warnings 2026-01-07 14:12:15 -05:00
Andrew Scott
bcef77d950 fix(router): Fix RouterLink href not updating with queryParamsHandling
There was a bug introduced in #60875. While RouterLink doesn't
necessarily depend on Router state, its link can change when navigations
cause the `ActivatedRoute` paths to change. It is difficult to determine
which segments the link depends on. Luckily, the commit had flawed
logic:

```
!this.queryParamsHandling && !dependsOnRouterState(this.options?.defaultQueryParamsHandling);
```

The subscription gets created whenever `queryParamsHandling` was not
defined, or it was non-default. This is pretty much all scenarios since
nobody is likely to set it explicitly to the default value. In addition,
the `click` handler recomputes the tree because `urlTree` is a getter
that does the computation.

This commit effectively rolls back #60875
2026-01-07 14:08:13 -05:00
SkyZeroZx
e7d99f02cb fix(forms): clean up abort listener after timeout
Removes the abort event listener once the debounce timeout completes.

This avoids lingering listeners, prevents potential memory leaks, and ensures
the abort logic runs at most once.
2026-01-07 14:07:25 -05:00
Kristiyan Kostadinov
3a56c1367f fix(compiler): produce accurate span for typeof and void expressions
Fixes that the `typeof` and `void` expressions were starting their spans from the expression start, rather than the keyword.

Fixes #66174.
2026-01-07 14:04:05 -05:00
SkyZeroZx
0d6ac92ccb docs: remove Component suffix from examples in DI & Drag and Drop
Updates documentation examples to remove the `Component` suffix, aligning them with the current Angular Style Guide.
2026-01-07 13:59:17 -05:00
AleksanderBodurri
241bdeb698 feat(devtools): create an info snackbar when a user logs a property
Previously there is no feedback when clicking this button in Angular DevTools itself, which can produce some confusion if the user does not have the browser console open as well, or if they accidentally turned on some filtering in the browser console.

Now Angular Devtools uses mat snack bar to inform the user that the task was successful
2026-01-07 13:40:45 -05:00
Angular Robot
a6d7ee0bb4 build: update dependency ng-packagr to v21.1.0-rc.0
See associated pull request for more information.
2026-01-07 13:35:44 -05:00
Angular Robot
c03e78dfbf docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-01-07 13:34:54 -05:00
Kristiyan Kostadinov
80b0fbba1f fix(core): avoid leaking view data in animations
The animations code currently tracks which views have running leave animations by adding them to a `Set`. This can leak memory if we don't clean something up on time.

These changes switch to tracking the views by their ID which doesn't risk retaining the view.

Fixes #66255.
2026-01-07 12:39:00 -05:00
Kristiyan Kostadinov
a0dfa5fa86 feat(core): support rest arguments in function calls
Updates the template syntax to support rest arguments in function calls. This can be handy for functions with a variable number of arguments.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
6e18fa8bc9 feat(core): support spread elements in array literals
Expands the template syntax to support spread elements inside arrays. This can be handy for some bindings.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
19ca3b66a3 refactor(compiler): add spread elements to expression AST
Updates the expression AST to support spread elements that will be used for arrays and function calls.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
e9c3932e0e refactor(compiler): add spread elements to the output AST
Adds spread elements to the output AST which can be used in arrays and function calls.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
63b0ad7fa5 refactor(compiler-cli): account for spread elements in translator
Adds the ability to generate spread elements in the linker.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
e407280ab5 feat(core): support spread expressions in object literals
Adds support for spread expressions inside of object literals. This can be handy when constructing maps for `class` bindings.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
81549248b7 refactor(compiler): add spread elements to expression AST
Updates the expression AST to have support for spread elements inside object literals.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
a789ff0824 refactor(compiler-cli): account for spread assignments in linker
Updates the linker to account for spread assignments in object literals.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
05ce944a9f refactor(compiler): support spread elements in output AST
Updates the output AST to account for spread elements.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov
35830079bd refactor(compiler): handle spread operators in the lexer
Updates the expression lexer to handle spread operators.
2026-01-07 12:37:52 -05:00
Andreas Dorner
1c00ab42f8 feat(router): extend paramters of RedirectFunction to include paramMap and queryParamMap
adds paramMap and queryParamMap to the partial ActivatedRoute of the
RedirectFn

fixes ##60842
2026-01-07 12:36:54 -05:00
SkyZeroZx
85ce5f3ce7 docs: update copyright year 2026-01-07 12:28:34 -05:00
Andrew Scott
97fd1de0ac Revert "refactor(router): Add support for precommitHandler in Navigation integration"
This reverts commit 522fa716b8.
2026-01-07 11:45:58 -05:00
Andrew Scott
397dbc4c37 Revert "refactor(router): Retain original navigateEvent across redirects"
This reverts commit 53d3ae0feb.
2026-01-07 11:45:58 -05:00
Matthieu Riegler
b17f93b6d1 docs(docs-infra): Use category for signal forms guides 2026-01-07 09:35:19 -05:00
Matthieu Riegler
640693da8e feat(compiler): Add support for multiple swich cases matching
consecutive `@case` blocks are now supported:

```ts
@switch (case) {
  @case (0)
  @case (1) {
    case 0 or 1
  }
  @case (2) {
    case 2
  }
  @default {
    default
  }
}
```

fixes #14659
2026-01-07 09:23:50 -05:00
Andrew Scott
e44839b016 feat(router): Add standalone function to create a comptued for isActive
This change deprecates `Router.isActive` in favor of a function that
creates a computed which tracks whether a given url/UrlTree is active,
following changes in the router state.

`Router.isActive` contributes ~1333b to the bundle size, but is only
used by developers who use the API directly or who use
`RouterLinkActive`. It should not contribute to bundle sizes of
applications that do not use this functionality.
2026-01-07 09:23:06 -05:00
hawkgs
51ed487fae docs(core): fix Ivy view data docs tables
The current formatting prevents the tables to be rendered making it hard to read them.
2026-01-07 09:22:43 -05:00
SkyZeroZx
3dfdb71d65 docs: add docs for transform property in built-in loaders 2026-01-07 09:17:59 -05:00
Paweł Kawula
f811c6c69d docs: fixed incorrect link in migrating-to-vitest.md
provided correct link to section about vitest fake timer
2026-01-07 09:10:30 -05:00
Andrew Scott
174d2da29a Revert "fix(router): Ensure createUrlTree does not reuse segments of input"
This reverts commit 39efb62c0f.
2026-01-06 16:29:19 -08:00
Miles Malerba
2d85ae5811 feat(forms): add [formField] directive
This will replace the `[field]` directive, since `[field]` is a very
generic name for signal forms to commandeer

refactor(forms): hook up `formField` directive in compiler

Hooks up the `formField` direcive to get the same treatment as the
`field` directive in the compiler.

apply updated formatting
2026-01-06 17:21:06 -05:00
Andrew Scott
53d3ae0feb refactor(router): Retain original navigateEvent across redirects
This builds off of #66197 by retaining the original navigateEvent across redirects
so the NavigateEvent can more accurately track the lifecycle of a navigation,
which may span across several NavigationStart events due to redirects
2026-01-06 16:10:56 -05:00
Andrew Scott
522fa716b8 refactor(router): Add support for precommitHandler in Navigation integration
The `precommitHandler` of the Navigation API unlocks some of the truly
powerful features for Routers like Angular's which defer the URL
updates. Without the `precommitHandler`, we cannot initiate a navigation
until we are ready to commit the URL because it causes the URL to update
immediately.

With `precommitHandler` support, we are able to create a `NavigateEvent`
_immediately_ on navigation, which allows the browser to show that a
navigation is happening with a loading indicator. Site visitors will
also have the ability to cancel the navigation with the "stop" button.
When we are ready to commit the URL, the precommitHandler supports a
"redirect" function that we can use to first redirect the navigation to
a new location immediately before committing it.

The commit operation is not synchronous because the API waits for all
precommitHandlers to resolve. This commit adds a small bit of handling
to account for this so that the Router's transition does not advance
to the next stage until the URL has been committed.
2026-01-06 16:10:56 -05:00