36729 Commits

Author SHA1 Message Date
Matthieu Riegler ad699cebb5 docs: change language section to "community translations" 2026-01-12 09:30:18 -08:00
Andrew Scott 89d47d814d refactor(router): Change RouterLink internals to use signals
This simplifies some of the internals of RouterLink because signals do
the heavy lifting of determining when things have changed
2026-01-12 08:56:32 -08:00
Angular Robot 460c1c7e71 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-12 08:55:15 -08:00
omar-almasry11 405b05607c fix(docs-infra): improve symbolic green contrast for WCAG compliance
Adjusts the symbolic green color to meet WCAG contrast requirements in documentation styles.
2026-01-12 08:50:33 -08:00
Jeevan Mahesha 66b40d4fb3 docs: update testing guide to include Vitest and improve authGuard test setup 2026-01-12 08:32:11 -08:00
Angular Robot 783f20edbc build: update pnpm to v10.28.0
See associated pull request for more information.
2026-01-12 08:31:45 -08:00
Matthieu Riegler 7f1b790f84 docs: improve separation between enter and leave example
fixes #66359
2026-01-12 08:18:16 -08:00
Kristiyan Kostadinov f0dba6deb9 build: update license for vscode extension
The vscode extension still has the old license headers pointing pointing to AIO.
2026-01-12 08:17:39 -08:00
aparziale e7f24014cf docs(docs-infra): Angular Aria listbox shows placeholder for "Selection modes"
Improved documentation for the aria listbox component. Added an example comparing selectionMode input.

Fixes: #65682
2026-01-12 08:17:11 -08:00
Angular Robot 9333751525 build: update dependency @actions/github to v7
See associated pull request for more information.
2026-01-12 08:16:24 -08:00
Angular Robot f34eb65f89 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-12 08:15:55 -08:00
SkyZeroZx 0aaadafc50 refactor(compiler-cli): update error message links to versioned docs (#66374)
Error message links now point to the archived documentation site (v*.angular.dev)
so that referenced content matches the framework version in use.

See angular#44650

PR Close #66374
2026-01-09 22:33:51 +00:00
SkyZeroZx f4469ad583 refactor(core): update error message links to versioned docs (#66374)
Error message links now point to the archived documentation site (v*.angular.dev)
so that referenced content matches the framework version in use.

See angular#44650

PR Close #66374
2026-01-09 22:33:51 +00:00
Miles Malerba 5671f2cc07 fix(forms): Rename signal form [field] to [formField]
This completes the rename started in #66136. `[field]` is too generic of
a selector for the forms system to own, and likely to cause naming
collisions with existing components. Therefore it is being renamed to
`[formField]`
2026-01-09 14:33:09 -08:00
tomer953 008e20ca56 fix(migrations): prevent duplicate imports in common-to-standalone migration
The common-to-standalone migration did not check for existing imports
when adding needed imports after removing CommonModule. This change adds deduplication
logic to filter out imports that already exist in the imports array
before adding them, ensuring each import appears only once.
2026-01-09 14:30:47 -08:00
Angular Robot 5c16caa95e build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-09 11:26:15 -08:00
Alan Agius 99db2e9065 ci: add pnpm and typescript exclusions to a Renovate package rule.
This will be handled in dev-infra preset, see: https://github.com/angular/dev-infra/pull/3340
2026-01-09 10:41:54 -08:00
Kristiyan Kostadinov 7b5625e72a refactor(compiler): isolate arrow function processing
Isolates the logic that fixes references to arrow function parameters so that we don't have do pass extra parameters for every `convertAst` call.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov 4cf1a92288 refactor(compiler): rework arrow function storage
Reworks how we store arrow functions in the following ways:
1. Rather than the `storeCallback` and `getCallback` instructions, we generate a single `arrowFunction` instruction.
2. The `arrowFunction` instruction uses a factory to create a new instance of the function when a function is read for the first time.
3. We now keep arrow functions in listeners in line so that they have access to `$event`.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov d9923b72a2 feat(core): support arrow functions in expressions
Adds support for using arrow functions in Angular expressions. They generally behave like JS arrow functions with the same access as other Angular expressions, but with the following limitations:
* We only support arrow functions with implicit returns, e.g. `(a) => a + 1` is allowed while `(a) => { return a + 1 }` is not.
* Pipes can't be used inside arrow functions, but they can be passed through to pipes.

To avoid recreating the functions in each change detection, the compiler applies a couple of optimizations:
* If an arrow function only references its own parameters, it is extracted into a top-level constant that is passed around to the different usage sites.
* If an arrow function has references to the template context, we store it on the current view and read the stored value later on.

Fixes #14129.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov 3242a61bae fix(compiler): variable counter visiting some expressions twice
The `countVariables` phase visits all ops in the list and all nested expressions in order to count how many variables are used. Currently it does so by going through `unit.ops()` and then calling `visitExpressionsInOp` on each op.

This leads to expressions in ops that have nested ops (e.g. `ListenerOp`) to be visited twice, because `unit.ops()` descends into child ops and then `visitExpressionsInOp` does the same. It hasn't been a problem so far, because the only expressions that can have vars in host bindings are pure functions and they aren't generated for listeners, but it will become a problem for arrow functions since they can be used in listeners.

These changes resolve the issue by iterating over the `unit.create` and `unit.update` instead.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov 17733b70a3 refactor(core): add instructions for callback storage and retrieval
Adds the `ɵɵstoreCallback` instruction that allows for a callback to be stored for later usage, as well as `ɵɵgetCallback` which can be used to retrieve it.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov 87a422358b refactor(compiler-cli): template type checking support for arrow functions
Updates the template type checker to support arrow functions. The main challenge was getting the current infrastructure not to rewrite references to arrow function parameters.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov f05d08f432 refactor(compiler): add arrow function parsing
Updates the expression parser to handle arrow functions. Since arrow functions share syntax with other AST nodes, we have to detect them by looking ahead and then potentially jumping backwards depending on what we see.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov ab536f8f32 refactor(compiler): add AST nodes for arrow functions
Expands the expression AST to include arrow functions.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov d01e54dea4 refactor(compiler): tokenize =>
Adds some logic to tokenize the `=>` character combination in the lexer.
2026-01-09 10:35:37 -08:00
Andrew Scott da364d2635 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-09 10:31:26 -08:00
fisker 4fb24cadee refactor(compiler): switch Binary.isAssignmentOperation to type guard function
Improve `Binary.isAssignmentOperation` types
2026-01-09 09:59:29 -08:00
Angular Robot ac865b51f7 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-09 09:55:40 -08:00
SkyZeroZx 94b707957a docs(docs-infra): avoid persistent AbortSignal listener in wait debounce in search
Cleans up the abort listener once the timeout resolves to prevent it from
remaining attached longer than necessary.
2026-01-09 09:38:07 -08:00
Yahya-Almubarak e3b3290998 docs: replace UnambiguousRoleValidator in asyc-valdotors part form-validation.md
The async validators part of document uses uniqueRoleValidator and not UnambiguousRoleValidator.
2026-01-09 09:26:18 -08:00
Devin Chasanoff 09234753e1 docs: add ai tutor signal forms docs 2026-01-09 09:25:38 -08:00
Angular Robot e6a8bb81f9 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-09 09:05:18 -08:00
kirjs 7d985ce08e docs(forms): Clarify returning errors from submit functions
Update outdate comment, and add a section to the docs
2026-01-09 08:47:42 -08:00
fisker a7e470a1b3 refactor(compiler): tighten Unary.operator type
Improve `Unary.operator` type
2026-01-09 08:47:01 -08:00
fisker 4d19408e9b refactor: _ParseAST.isAssignmentOperator to type guard
Update `_ParseAST.isAssignmentOperator` to type guard
2026-01-09 08:45:35 -08:00
fisker 07a08ab9f8 refactor(compiler): tighten Binary.operation type
Improve `Binary.operation` types
2026-01-09 08:45:35 -08:00
fisker 04ba09a8d9 feat(compiler): support AstVisitor.visitEmptyExpr()
Add support for `AstVisitor.visitEmptyExpr()`
2026-01-09 08:45:12 -08:00
hawkgs e66aeac8d0 refactor(devtools): style the profiler dialogs to match the current design
Decrease the font size and tone down the paddings and margins. Use `ng-button` instead of `mat-button`.
2026-01-09 08:23:18 -08:00
hawkgs bea5840864 refactor(devtools): add secondary type button
Add a secondary style/type button to `ng-button`.
2026-01-09 08:23:18 -08:00
SkyZeroZx 3a65814f53 docs(docs-infra): improve label fallback logic in search results
Improves label fallback in search results by providing a fallback to the top-level category when a more specific label is missing.
2026-01-09 07:58:33 -08:00
SkyZeroZx 0d35088b56 docs: add docs support for spread and rest operators in expression syntax 2026-01-09 07:58:07 -08:00
Angular Robot 3ccd5a4354 build: update cross-repo angular dependencies to v21.1.0-next.4
See associated pull request for more information.
2026-01-09 07:49:52 -08:00
Alon Mishne c963f35d2c docs: Updated MCP docs to include latest experimental tools and recent renames 2026-01-09 07:48:22 -08:00
Matthieu Riegler 80a7419a16 Revert "docs: remove incorrectly listed operators in "Supported operators" table (Expression Syntax Guide) (#62092)"
This reverts commit ea71a1e8cd.
2026-01-09 07:47:49 -08:00
Andrew Scott 49295778bc refactor(core): Use the provided Document value rather than global in FakeNavigation
This commit ensures the Document used by `FakeNavigation` is the one
passed in the constructor rather than the global `document`, which may
be different.
2026-01-08 13:28:18 -08:00
Andrew Scott 473dd3e1cb fix(compiler-cli): attach source spans to object literal keys in TCB
Previously, object literal keys in the TCB did not have source spans attached. This made it difficult for the Language Service to distinguish between keys and values, leading to incorrect completion contexts and diagnostic locations.

This commit ensures that source spans are properly attached to the keys in the TCB.
2026-01-08 13:27:08 -08:00
Angular Robot 00905c1c03 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-08 13:26:26 -08:00
Jessica Janiuk 9529362617 docs: release notes for the v21.1.0-rc.0 release 2026-01-08 12:52:40 -08:00
Jessica Janiuk e005eb4e66 release: bump the next branch to v21.2.0-next.0 2026-01-08 12:52:40 -08:00