38449 Commits

Author SHA1 Message Date
Alan Agius e3630c23c5 feat(http): add options to allow caching of credentialed and non-cacheable HTTP requests
Adds `includeRequestsWithCredentials` and `includeNonCacheableRequests` options to `HttpTransferCacheOptions`.
2026-07-06 14:03:32 -07:00
Angular Robot 8e090cbe82 build: update bazel dependencies
See associated pull request for more information.
2026-07-06 14:03:09 -07:00
Matthieu Riegler 997b772f28 fix(compiler): use regular optional chaining expression for safe function calls in TCBs
Optional return types should not report non-nullable optional chaning on function calls.

fixes #69609
2026-07-06 14:02:40 -07:00
SkyZeroZx d9639201b3 test(router): Update tests to use currentNavigation()
Updates router integration tests to use the `currentNavigation()` method instead of deprecated `getCurrentNavigation`.

Also replaces direct `setTimeout` calls with the `timeout()` utility function.
2026-07-06 14:01:11 -07:00
Shuaib Hasan Akib 0285f558f9 refactor(forms): improve type safety of RadioControlRegistry._accessors
Replace `any[]` with `[NgControl, RadioControlValueAccessor][]` for the
private `_accessors` field in `RadioControlRegistry`. This aligns the
field type with how it is used in `add()`, `remove()`, `select()`, and
`_isSameGroup()`, which already typed its parameter as
`[NgControl, RadioControlValueAccessor]`.
2026-07-06 13:59:16 -07:00
Angular Robot d60b59a7e9 build: update all github actions
See associated pull request for more information.
2026-07-06 13:54:52 -07:00
Angular Robot d518d8db35 build: update pnpm to v11.10.0
See associated pull request for more information.
2026-07-06 13:52:39 -07:00
Angular Robot fd305c3743 build: update dependency @mcp-b/webmcp-polyfill to v4
See associated pull request for more information.
2026-07-06 13:50:12 -07:00
Cheng-Hsuan Tsai d6e4529b55 docs: update API reference links in aria guides 2026-07-06 13:49:48 -07:00
Kam 551cb3b8b5 fix(docs-infra): lock background scroll while the search dialog is open
The search dialog (Cmd/Ctrl+K) opens as a native modal via `showModal()`, but the
page behind it stayed scrollable, so scrolling drifted the underlying content
beneath the blurred backdrop.

`body` already reserves a stable scrollbar gutter, so setting `overflow: hidden`
while the dialog is open blocks background scrolling with no layout shift. The rule
keys off the dialog's `[open]` state, so it restores automatically on every close
path (Escape, click-outside, navigation) with no script involved.
2026-07-06 13:48:53 -07:00
Kam 95a953145e fix(docs-infra): restyle prefer/avoid code block headers
The "Prefer" / "Avoid" code block headers rendered the style label as
plain inline text joined to the title with a bare "-" separator, giving
the two block types little visual distinction. The taller label also left
the prefer/avoid header at a different height from the plain filename
header, so the copy button's single "top" value could not center it in
both.

Style the label as a small uppercased pill tinted with the block's style
color, drop the "-" separator, add a subtle inset accent under the header,
and swap the heavier "dangerous" icon on "Avoid" for "close". Give every
header a fixed height with box-sizing: border-box and vertically center
its contents so all variants render at the same height and the copy button
stays centered.

This supersedes #69638, folding in its centering fix for the copy button
offset that #69030 introduced.
2026-07-06 13:48:14 -07:00
Shuaib Hasan Akib 9153515422 docs: fix broken ordered list in NG0912 error page
Fenced code blocks between list items in NG0912.md were not indented,
causing Marked.js to treat them as top-level block elements that
interrupt the list. This resulted in two separate <ol> elements being
rendered instead of one.

Indent the code blocks by 4 spaces so they are treated as continuation
content of their list items, and change the second `1.` to `2.` for
correctness.
2026-07-06 13:47:24 -07:00
Kam 12a4e60a4a fix(docs-infra): prevent tab labels from being clipped
The active docs tab applied a 2px bottom border that inactive tabs lacked,
which shrank the active label's content box and clipped its descenders. It
also set `line-height: 1.5` only on the active label, so switching tabs
nudged the text. Reserve the border as transparent on every tab and recolor
it on the active one, and share the label `line-height`, so the letters are
no longer cut and the label stays put when switching.
2026-07-06 13:46:40 -07:00
SkyZeroZx 205acb3494 docs: add docs for deep link support for Angular components in Chrome DevTools profiling 2026-07-06 13:45:40 -07:00
aparziale 207abf1140 fix(docs-infra): strip newlines from class signature in API gen
Prevents multiline generics or implements clauses from breaking the
rendered class signature in the API reference docs.
2026-07-06 13:44:17 -07:00
Hazem Alyaari c894b00d25 docs: fix typos and broken examples in guide content
Correct grammar, punctuation, and code examples across signals, forms, http, and templates guides so copy-paste snippets compile and read clearly.
2026-07-06 13:43:47 -07:00
Bhuvansh855 91fd0ca8db docs: improve Signal Forms complete example 2026-07-06 13:41:20 -07:00
Hazem Alyaari 8c8f3ac528 docs: fix terminology typos in Signals overviews
Fixes #69595

Fixes #69597
2026-07-06 13:40:18 -07:00
Shuaib Hasan Akib 892a6eb69a fix(docs-infra): add target="_blank" to external links in @see JSDoc tags
External links rendered via `@see {@link ...}` and `@see [label](url)`
were not opening in a new tab. The `getHtmlAdditionalLinks` function
now sets `target: '_blank'` on `LinkEntryRenderable` objects whose URL
is external, and `docs-pill-row.tsx` passes the `target` attribute to
the rendered anchor tag.

Fixes: #69593
2026-07-06 13:39:48 -07:00
Kam e4ffb24ecb fix(docs-infra): keep copy link icon out of the search index
The copy link button rendered its icon as a Material Symbols ligature text node, and since the button is appended inside each heading's `.docs-anchor`, that text leaked into the heading and the Algolia crawler indexed values like `Descriptionlink`. The glyph is now rendered via a `::before` pseudo-element using the icon codepoint, so no `link`/`check` text exists in the DOM and headings index correctly again.
2026-07-06 13:39:11 -07:00
Matthieu Riegler 5ad937be5e docs: correct docs about the chain behavior.
Even if the chained resource has a value, it might throw an error.

fixes #69330
2026-07-06 13:37:23 -07:00
Matthew Beck d579ecaf73 feat(compiler): Disable '--global-' error outside of g3 (#68846)
... for now. Should be enabled in the next major.

PR Close #68846
2026-07-06 13:36:24 -07:00
Matthew Beck 8c8b2f7783 feat(compiler): Support css var namespacing in properties (#68846)
Adds support for namespacing css variables in style properties. Behaves
as you'd expect following the implementation for stylesheets generally.

This change also moves the error message into a util function since we
now need to produce the same error in three places.

PR Close #68846
2026-07-06 13:36:24 -07:00
Matthew Beck af5e4e1131 feat(compiler): Add an error for --global-foo cases (#68846)
Using `--global-foo` is now prohibited. We suspect these cases will
likely be typos of `--global--foo` in the future, so we blanket ban them
and direct users to the expected syntax.

PR Close #68846
2026-07-06 13:36:24 -07:00
Matthew Beck f98547675c feat(compiler): Namespace CSS variables to the app (#68846)
Adds logic to inject symbols into CSS variables for runtime namespacing.
The runtime now replaces instances of `%NS%` with a namespacing
variable, limiting reach of CSS variables to the current app. An opt-out
syntax of a `--global` prefix allows users to avoid this behavior.

PR Close #68846
2026-07-06 13:36:24 -07:00
SkyZeroZx bbbcf8fc7f docs: add @see references to Signal Forms 2026-07-06 13:35:20 -07:00
arshsmith1 cbbb1d8ba1 fix(router): handle outlet named __proto__ in segment group maps
Outlet maps are keyed by names read verbatim from the url, so a name like
`__proto__` (e.g. `/one(__proto__:two)`) is assigned through the inherited
`__proto__` setter instead of creating an outlet. This drops the outlet and
mutates the map's prototype, and throws under Node's `--disable-proto=throw`.

Build these outlet maps with `Object.create(null)` so `__proto__` is treated as
an ordinary key. Covers `parseParens` and `squashSegmentGroup` in url_tree.ts,
`createSegmentGroup` in apply_redirects.ts, and `replaceSegment` and
`updateSegmentGroupChildren` in create_url_tree.ts.
2026-07-06 13:34:04 -07:00
SkyZeroZx 95f56d33fe feat(devtools): Adds deep linking from Chrome Performance panel
Enables direct navigation to Angular components from the Chrome Performance panel's flame graph.

This feature integrates Angular DevTools with Chrome's `setOpenResourceHandler` by registering a custom URL scheme (`angular-devtools://component/{instanceId}`).

Closes #63960
2026-07-06 13:32:32 -07:00
SkyZeroZx eab4847a8b feat(core): Adds deep linking from Performance panel to DevTools
Introduces unique, IDs for component instances during profiling.

Embeds these instance IDs into custom `angular-devtools://component/ID` URLs for component and lifecycle hook events recorded in Chrome's Performance panel. This allows users, when deep linking is enabled, to click on a component event in the timeline summary and navigate directly to that specific component instance in the Angular DevTools extension.

Closes angular#63960
2026-07-06 13:32:32 -07:00
Alex Rickabaugh b126dc9726 release: cut the v22.1.0-next.4 release v22.1.0-next.4 2026-07-01 14:10:31 -07:00
Alex Rickabaugh c4fa24abf6 docs: release notes for the v22.0.5 release 2026-07-01 13:54:42 -07:00
Bhuvansh855 c4cb66e602 docs: improve introductory resource example 2026-06-30 18:00:03 -07:00
Shuaib Hasan Akib a74801c59c fix(router): fix malformed jsdoc comment for RouterLinkWithHref export
The export statement was incorrectly placed inside the JSDoc comment block,
and there was a stray text fragment "nstead." from the deprecation message.
This moves the export statement outside the comment and removes the stray text.
2026-06-30 17:59:36 -07:00
Kam b9125db156 docs(docs-infra): show the schema function in the validation example
The "schema function" example on the Validation guide page pointed its
visibleLines and highlight ranges at the wrong source lines. The
collapsed view showed the component's imports and model signal instead
of the schema function, and the highlight marked unrelated lines, so
readers had to expand the example to find the code the section is about.

The example file was edited at some point and these line numbers were
not updated to follow it. Point visibleLines at the form() schema call
(lines 29-34) and highlight the three validator calls (lines 30, 31, 33)
so the relevant code is visible by default.

Fixes #69547
2026-06-30 17:57:55 -07:00
Kam a9e3336aae fix(docs-infra): improve code selection contrast in dark mode
The ::selection background mixes only 10% of the accent color into
--octonary-contrast. In dark mode --octonary-contrast resolves to
gray-900 (#151417), which is the same color code blocks use as their
background, so selected code renders ~90% code-background and is almost
invisible.

Add a .docs-dark-mode ::selection override that raises the tint to 30%
so highlighted text stays legible over the near-black surface. Light
mode is unchanged, as its selection already contrasts the white page.

Fixes #69507
2026-06-30 17:56:35 -07:00
Eduard Fischer-Szava 19a912a6ef docs: fix incorrect @defer trigger names and a duplicate word in guides
The @defer guide reused the viewport section's prose in the
interaction and hover sections without updating it:

- interaction: the template reference variable is passed on the
  interaction trigger, not the viewport trigger.
- hover: the element is hovered over and the variable is passed on the
  hover trigger, not "watched to enter the viewport" / viewport.

Also removes a duplicate "keep the" in the routing
customizing-route-behavior guide.

Documentation-only; no code changes.
2026-06-30 17:52:16 -07:00
Hien Pham d748e8160d docs: clear mock after each test and refine expectation for tax calculator call
- We need to clear the mock between different assertions
- We have either toHaveBeenCalledOnce or toHaveBeenCalledExactlyOnceWith matcher
2026-06-30 17:51:36 -07:00
SkyZeroZx b6dbdcfe34 docs: remove ChangeDetectionStrategy.OnPush from Signal Forms tutorial 2026-06-30 17:49:31 -07:00
Michael Small 42affba3b7 docs: remove standalone: true and explicit OnPush from forms skill
docs: remove `standalone: true` from `signal-forms.md`

docs: remove explicit `OnPush` from signal forms skill

docs: remove import of CD strategy
2026-06-30 17:48:51 -07:00
arturovt 311aff05aa fix(common): use Object.hasOwn in I18nSelectPipe to handle null-prototype and shadowed mappings
`I18nSelectPipe.transform()` called `mapping.hasOwnProperty()` directly,
which fails in two edge cases:

- Mappings created with `Object.create(null)` have no prototype and
  therefore no `hasOwnProperty` method, causing a TypeError at runtime.
- Mappings where a key literally named `hasOwnProperty` shadows the
  built-in method return incorrect results silently.

Replace both call sites with `Object.hasOwn(mapping, key)`, which
delegates through `Object` directly and is immune to both issues.

Add two regression tests that demonstrate the broken behaviour before
the fix and pass after it.
2026-06-30 17:46:35 -07:00
Alan Agius 785d254433 ci: setup Node.js in adev-preview-deploy workflow using .nvmrc
Ensures that the correct Node.js version is used.
2026-06-30 17:45:19 -07:00
Kristiyan Kostadinov e844ad18a0 refactor(compiler): move block name normalization into lexer
Previously I intentionally kept the lexer as generic as possible so that block detection can happen later. However, since #62644 we detect blocks in the lexer so we might as well normalize them there so all the upstream code doesn't have to account for things like whitespace.
2026-06-30 17:44:25 -07:00
Kristiyan Kostadinov 292199aa4d fix(compiler): permissive whitespace parsing in default never blocks
Makes the parser more permissive towards whitespaces between words in the `default never` block.
2026-06-30 17:44:25 -07:00
Alan Agius 7a7a612e48 docs: remove fixed font-size from table headers in docs
Removes the fixed font size from table headers to ensure they scale properly and do not appear smaller than the table content.
2026-06-30 17:41:27 -07:00
Alan Agius c92d38c097 docs: update service documentation to compare @Service and @Injectable decorators with a feature comparison table
Closes: #69563
2026-06-30 17:40:51 -07:00
yamanerkam cbd97072f4 fix(docs-infra): don't auto-link code symbols used as link text
When an inline code symbol is used as the text of an explicit markdown
link (e.g. [`httpResource`](/guide/http/http-resource)), the codespan
renderer recognized it as an API symbol and wrapped it in a second
anchor pointing at the API reference. This produced nested <a> tags, so
the explicit link was effectively replaced by the API symbol link.

Disable auto-linking while rendering a link's inner tokens so the
explicit href is preserved, matching the pattern already used by the
heading and docs-card renderers.

Fixes #69549
2026-06-30 17:39:34 -07:00
Angular Robot 2df56d7de0 build: update dependency conventional-changelog to v8
See associated pull request for more information.
2026-06-30 17:35:57 -07:00
SkyZeroZx d7f70616a0 fix(core): reject dynamic script host elements
The previous fix for GHSA-692r-grfm-v8x7 was incomplete because it rejected script tags only when locating an explicit host element. Dynamic component instantiation can also infer the host element from the component selector.

Move the script-host rejection to the point where ComponentFactory has resolved the host element for either path, so createComponent rejects script hosts consistently.
2026-06-30 17:29:36 -07:00
Angular Robot a68e610641 build: update pnpm to v11.9.0
See associated pull request for more information.
2026-06-30 17:28:36 -07:00
Andrew Scott a7bde662c3 refactor(core): allow AnimationClassBindingFn to return undefined or null
The AnimationClassBindingFn type was too restrictive, only allowing `string | string[]`. However, the runtime (`getClassListFromValue`) safely handles `undefined` and `null` values by treating them as no animation.

This change updates the type to allow `undefined` and `null`, which is consistent with other class/style bindings in Angular and avoids requiring workarounds (like empty strings) in host bindings.

Added a compliance test case to verify that `[animate.enter]` with a potentially `undefined` value compiles correctly.
2026-06-30 17:27:59 -07:00