38550 Commits
Author SHA1 Message Date
Jessica Janiuk fc187d4aec release: cut the v22.2.0 release v22.2.0 2026-09-23 10:52:59 -07:00
Andrew Scott 52c33bc51d refactor(router): clean up route resource implementation and test helpers
Clean up router resource handling:
- Simplify reload method handling on router resource wrappers
- Clean up resources access in outlet input binding effects and component input binder
- Extract waitForResource helper for tracking blocking resource readiness
- Simplify setupNewRouterResources and updateExistingResources
- Remove redundant fixture.whenStable() calls in router resource tests

(cherry picked from commit 344b10f026)
2026-09-23 15:51:39 +00:00
SkyZeroZx 5af61216ea fix(router): avoid dense elements allocation for numeric URL keys
Keep numeric URL keys in V8 dictionary storage while parsing URLs and
copying segment groups. This avoids oversized allocations for each
segment without changing route matching or component input binding.

Fixes #70716

(cherry picked from commit 37196053d5)
2026-09-23 15:51:10 +00:00
Andrew Scott 369d1f4f4f docs(upgrade): add maintenance mode note
Add an important note to the @angular/upgrade package documentation
indicating that the package is in maintenance mode and only security
fixes will be accepted, similar to @angular/service-worker and zone.js.

(cherry picked from commit be7ee3a68b)
2026-09-23 15:42:54 +00:00
Kam efe48dfa64 docs(core): fix three JSDoc rendering bugs on the API pages
`Compiler` links to `{@link AbstractComponentFactory}`, a symbol that does not
exist, so the API page renders a dead link to an anchor on itself. The service
returns `NgModuleFactory`, which is public API.

`TypeProvider` has a stray quote in `` `Type' ``, which leaves the code span
unclosed and prints the backtick.

`ContentChildren` and `ViewChildren` write `** Note: ***`, which renders as
literal asterisks instead of a bold label.

(cherry picked from commit 95e8dec4e2)
2026-09-22 23:04:03 +00:00
Andrew Scott 9bbc7e2dce docs(router): reorganize and reword route resources guide
Restructure the route resources guide into a clearer flow:
- Enabling the feature
- Defining route resources and ResourceContext
- Fine-grained signal reactivity
- Parallel execution
- Blocking and non-blocking resources
- In-place reloading without renavigation
- Transitional and rollback states

(cherry picked from commit 30ff1317a9)
2026-09-22 23:03:28 +00:00
Matthieu Riegler c11920da48 fix(vscode-extension): Support inlay hint in inline templates
We were explicitly not supporting them with an early return.

fixes #69649

(cherry picked from commit 517f67a4b7)
2026-09-22 23:02:43 +00:00
Kam 8287b3f1c4 docs(service-worker): render the SwPush and SwRegistrationOptions examples
The api-gen extractor only interpolates `{@example <path> region='<name>'}`,
so the three `<code-example>` tags on `SwPush` and the `header` on the
`SwRegistrationOptions` example are never substituted. Both ship to the API
pages as literal markup, and the snippets they point at are missing.

`push.ts` was the last file under `packages/*/src` still using the
`<code-example>` form.

(cherry picked from commit afcda88384)
2026-09-22 21:42:14 +00:00
Kam 70b48779cc docs: use the title attribute on embedded videos
`<docs-video>` reads only `src` and `title`, so the `alt` attribute on two
pages is dropped and the play link falls back to a generic "Play video"
label. On the typed forms guide that loses the video's name from the
accessible label entirely.

Pass `title` on both, and fix the kitchen sink prose that tells authors a
video "just needs a `src` and `alt`", which is where the attribute came
from. The extension's own test fixture used `alt` as well and the spec
never asserted on the label, so add that assertion.

(cherry picked from commit 95e7df429d)
2026-09-22 21:41:17 +00:00
Kam 7847ba7a45 docs: fix the phase label line break in the lifecycle summary table
The change detection cell used an unclosed `<p>` to break its label across
two lines. Browsers close it into a block paragraph, so "Detection" carries
14px of margin above and below and sits 50px below the top of the cell,
out of line with the method cell beside it. Use `<br>` instead.

The rest of the diff is `ng-dev format` on the file, which CI checks for
every file a pull request touches.

(cherry picked from commit 42da94c7fd)
2026-09-22 21:40:44 +00:00
Angular Robot 23bf078ce5 build: lock file maintenance
See associated pull request for more information.
2026-09-22 14:39:23 -07:00
Kam ad15967862 docs: correct the adev writing guide skill
The skill documents code block metadata as `header="Title"` and
`highlight="[1, 3-5]"`, but the tokenizer has only ever read the
`key: value` form. Since 7bbe2636dc that mismatch is fatal rather than
silent, so a guide written to the skill's own example now fails the
build with `Invalid code block metadata`. That change did not update
this file.

Correct the metadata syntax and document the `highlight` range
semantics and the `hideDollar` flag. Drop the `<docs-code>` `diff`
attribute, removed in 8ec0a4ee5c, and stop describing `preview` as a
StackBlitz link, which is disabled. Add the attributes `<docs-code>`
and `<docs-card>` accept, correct `<docs-video>` to `title` rather
than `alt`, which the extension has never read, and note that mermaid
works only in a fenced block.

(cherry picked from commit 249f55f2c6)
2026-09-22 21:14:49 +00:00
Andrew Scott 954f6aff9a test(router): Fix broken test
oops i broke it again.
2026-09-22 14:11:00 -07:00
Andrew Scott 6f5a4a06c2 fix(router): expose reload method on ActivatedRoute resources
Resources managed by the Angular Router implement a `reload(): boolean` method, but `ResourceResult` typed resources on `ActivatedRoute.resources` and `ActivatedRouteSnapshot.resources` as `Record<string, Resource<unknown>>`. This caused TypeScript errors when attempting to call `.reload()` without a type assertion.

This commit updates `ResourceResult` to intersect each resource with `Pick<WritableResource<unknown>, 'reload'>` so that `.reload()` is properly typed.

Fixes #70698
2026-09-22 14:11:00 -07:00
Angular Robot dbdca37059 build: update bazel dependencies
See associated pull request for more information.
2026-09-22 14:04:22 -07:00
SkyZeroZx 5e621df24b fix(platform-server): preserve Unicode whitespace in ServerXhr URLs
Avoid String.prototype.trim() when classifying server request URLs because it
strips Unicode whitespace that WHATWG URL parsing preserves as path data.
This mismatch can cause xhr2 to send credentials to a different origin than
the application approved.

Classify the unmodified request URL so whitespace-prefixed input falls through
URL resolution, and cover NBSP- and BOM-prefixed HTTP URLs.

Fixes #70540

(cherry picked from commit 44355181e2)
2026-09-22 21:01:48 +00:00
Alan Agius c5ad7f649f test(devtools): assert on eval spy in chrome-application-operations spec
Avoid asserting on chrome.devtools.inspectedWindow.eval directly via
Jasmine matchers, as TypeScript picks up the 3-argument overload
signature from @types/chrome, causing a TS2554 compilation error when
only 2 arguments are provided. Instead, assert directly on the
evalSpy instance.

(cherry picked from commit c0c5d452c3)
2026-09-22 21:00:56 +00:00
aparziale 5c927fba0d fix(vscode-extension): provide folding ranges for templates with interpolated strings
Inline templates written as template literals with `${...}` substitutions are `TemplateExpression` nodes, not string literals, so they were not recognized when building the virtual HTML document. The HTML language service received a blank document and produced no folding ranges, breaking element folding for the whole template.

Match template expressions in addition to string-literal-like nodes and blank out the `${...}` substitutions (preserving line breaks) so offsets
in the virtual document stay aligned and the expression contents are not parsed as HTML.

Fixes #65508

(cherry picked from commit 0ec19b571c)
2026-09-22 16:41:11 +00:00
SkyZeroZx d0f72299e7 test(core): cover boundary around projected content
Verify that a boundary around the receiving component catches errors from projected content and renders its fallback.

(cherry picked from commit fe75da1af5)
2026-09-22 16:17:17 +00:00
SkyZeroZx 20fa87dc24 docs: clarify boundary content projection limitation
(cherry picked from commit 1a32087b4d)
2026-09-22 16:17:17 +00:00
arturovt bc402cf407 fix(core): don't use plain objects as maps for jsaction data
The parsed jsaction action map, the parser cache keyed by the raw jsaction attribute value, and the fallback in getDefaulted were all plain {} objects. Looking up a key that was never explicitly set but happens to match an inherited Object.prototype member (toString, constructor, hasOwnProperty, ...) resolves to that inherited value instead of undefined, and callers only check `!== undefined` to decide whether there's a real action or cache entry.

Use Object.create(null) instead, which has no prototype to accidentally collide with.

(cherry picked from commit 8d8859cb21)
2026-09-22 16:06:51 +00:00
arturovt d45e4ab669 test(core): add failing test for jsaction action map resolving Object.prototype properties
Demonstrates that a plain {} used as the parsed jsaction action map resolves an inherited Object.prototype member (e.g. toString) for a key that was never explicitly parsed into the map, instead of undefined. Callers only check `!== undefined`, so this gets treated as a real action.

This commit adds the test only, without the fix, so the failure is visible on its own.

(cherry picked from commit 5cb3ed2958)
2026-09-22 16:06:51 +00:00
Matthew Beck 18edb1b0be fix(compiler): guard unverified ctor parameter types in class metadata
In local compilation mode the compiler can emit a reference to a symbol that it
was not able to prove has a value at runtime, because deciding that can require
information from other files. The generated factory already guards those
references with a `@ts-ignore`, but the `ctorParameters` callback passed to
`setClassMetadata` does not, so the same symbol ends up guarded in one place and
unguarded a few lines later in the same file. Type checking the generated code
then fails on the unguarded reference.

Constructor parameters are now handed to `@angular/compiler` in a structured
form rather than as an already-built callback, which lets the compiler attach a
suppression directly to the `type` property assignment of each parameter that
needs one. Only references that reflection could not verify are guarded: full
compilation resolves every reference, so its output is unchanged, and partial
declarations are published as JavaScript and never type checked, so they are
never guarded either.

Producers that build the callback themselves keep passing an expression, which
is emitted untouched.

(cherry picked from commit c92ed082ea)
2026-09-22 16:05:39 +00:00
rk 74ab5ea19e docs(forms): remove valid from the custom control state table
(cherry picked from commit 83ba06e90a)
2026-09-22 16:05:02 +00:00
David Herges ee6947e9d8 docs: link to latest on unpkg in angular-package-format.md
(cherry picked from commit 58a4ca67ec)
2026-09-22 16:03:11 +00:00
David Herges 418bd86466 docs: link to latest on unpkg in angular-package-format.md
Co-authored-by: Jaime Burgos <[email protected]>
(cherry picked from commit d389ae0c6d)
2026-09-22 16:03:11 +00:00
David Herges 0655ef5722 docs: update section headers in angular-package-format.md
Aligning section headers under the "File Layout" heading for better readability and consistent "On this page" hierarchy levels.

Grouping "Partial compilation" and "Optimizations" under a common section header, as these describe the compilation process from sources to final APF-compliant package.

(cherry picked from commit fc637788a0)
2026-09-22 16:03:11 +00:00
Alan Agius 60ac1a5826 build: remove unused merge-ready-status workflow
Removes the obsolete merge-ready-status workflow, which has been manually disabled and is no longer used.

(cherry picked from commit bf73d872ea)
2026-09-22 16:02:32 +00:00
Alan Agius 3821ddf8fc build: update pnpm to 11.27.1
Update the pnpm package manager version across package.json files and pnpm-lock.yaml files to 11.27.1.
2026-09-22 09:00:42 -07:00
Kam 378ecfc3f6 docs: sync AI context files with best-practices.md
The downloadable AI context files had drifted from the canonical
`packages/core/resources/best-practices.md`. `GEMINI.md` was also
missing the accessibility requirements and several rules that were
only added to `AGENTS.md` and `guidelines.md`.

Bring all three files in line: OnPush is the default in v22, `model()`,
`linkedSignal()`, Signal Forms, `@Service`, and no `CommonModule`. Also
drop the unused `ChangeDetectionStrategy` import from the example.

(cherry picked from commit d5f409cfab)
2026-09-21 21:45:19 +00:00