37781 Commits

Author SHA1 Message Date
Shuaib Hasan Akib 3aa7424cdd 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.

(cherry picked from commit 9153515422)
2026-07-06 13:47:28 -07:00
Kam 6165aedc12 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.

(cherry picked from commit 12a4e60a4a)
2026-07-06 13:46:44 -07:00
SkyZeroZx 6bcc733ec8 docs: add docs for deep link support for Angular components in Chrome DevTools profiling
(cherry picked from commit 205acb3494)
2026-07-06 13:45:44 -07:00
Kam dd6a661652 docs(docs-infra): remove firebase studio launcher
(cherry picked from commit 7977a4b9bc)
2026-07-06 13:44:47 -07:00
aparziale 24ab76ea56 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.

(cherry picked from commit 207abf1140)
2026-07-06 13:44:22 -07:00
Hazem Alyaari e77e9d610f 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.

(cherry picked from commit c894b00d25)
2026-07-06 13:43:51 -07:00
Bhuvansh855 44d6852203 docs: improve Signal Forms complete example
(cherry picked from commit 91fd0ca8db)
2026-07-06 13:41:24 -07:00
Hazem Alyaari bb8c3b5d40 docs: fix terminology typos in Signals overviews
Fixes #69595

Fixes #69597

(cherry picked from commit 8c8f3ac528)
2026-07-06 13:40:22 -07:00
Shuaib Hasan Akib 2e4673b63c 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
(cherry picked from commit 892a6eb69a)
2026-07-06 13:39:52 -07:00
Kam a1c5df2333 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.

(cherry picked from commit e4ffb24ecb)
2026-07-06 13:39:15 -07:00
Matthieu Riegler f03639cfd4 docs: correct docs about the chain behavior.
Even if the chained resource has a value, it might throw an error.

fixes #69330

(cherry picked from commit 5ad937be5e)
2026-07-06 13:37:27 -07:00
SkyZeroZx 8cedaecca8 docs: add @see references to Signal Forms
(cherry picked from commit bbbcf8fc7f)
2026-07-06 13:35:24 -07:00
arshsmith1 c238bd2ad7 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.

(cherry picked from commit cbbb1d8ba1)
2026-07-06 13:34:08 -07:00
Alex Rickabaugh 2b3277f5b7 release: cut the v22.0.5 release v22.0.5 2026-07-01 13:47:47 -07:00
Bhuvansh855 0554bf5cf1 docs: improve introductory resource example
(cherry picked from commit c4cb66e602)
2026-06-30 18:00:07 -07:00
Shuaib Hasan Akib ca13b42e7c 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.

(cherry picked from commit a74801c59c)
2026-06-30 17:59:40 -07:00
Kam 8dfad89a3d 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

(cherry picked from commit b9125db156)
2026-06-30 17:57:59 -07:00
Kam 23fe1a9116 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

(cherry picked from commit a9e3336aae)
2026-06-30 17:56:39 -07:00
Eduard Fischer-Szava 17966c2ff5 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.

(cherry picked from commit 19a912a6ef)
2026-06-30 17:52:19 -07:00
Hien Pham 39f112decd 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

(cherry picked from commit d748e8160d)
2026-06-30 17:51:40 -07:00
SkyZeroZx 7979ece76b docs: remove ChangeDetectionStrategy.OnPush from Signal Forms tutorial
(cherry picked from commit b6dbdcfe34)
2026-06-30 17:49:35 -07:00
Michael Small 4dfb0c4425 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
(cherry picked from commit 42affba3b7)
2026-06-30 17:48:54 -07:00
arturovt eb8fb9fe58 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.

(cherry picked from commit 311aff05aa)
2026-06-30 17:46:41 -07:00
Alan Agius bd82899807 ci: setup Node.js in adev-preview-deploy workflow using .nvmrc
Ensures that the correct Node.js version is used.

(cherry picked from commit 785d254433)
2026-06-30 17:45:23 -07:00
Angular Robot 98ea50718a build: lock file maintenance
See associated pull request for more information.
2026-06-30 17:43:43 -07:00
Alan Agius 533e17f568 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.

(cherry picked from commit 7a7a612e48)
2026-06-30 17:41:31 -07:00
Alan Agius cfb5fbb933 docs: update service documentation to compare @Service and @Injectable decorators with a feature comparison table
Closes: #69563
(cherry picked from commit c92d38c097)
2026-06-30 17:40:55 -07:00
yamanerkam 9798af94e6 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

(cherry picked from commit cbd97072f4)
2026-06-30 17:39:38 -07:00
SkyZeroZx ced0180b06 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.

(cherry picked from commit d7f70616a0)
2026-06-30 17:29:41 -07:00
Andrew Scott c3be83cfe1 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.

(cherry picked from commit a7bde662c3)
2026-06-30 17:28:04 -07:00
marktechson 6c83124b46 docs: updated roadmap
(cherry picked from commit d791a7f496)
2026-06-30 17:24:08 -07:00
yamanerkam d34cd66e96 fix(docs-infra): align and highlight external-link icon in nav sidebar
The open_in_new icon on external navigation items stayed grey on hover
and sat inset from the chevron column, so it never matched the chevron
items visually.

- Add a hover rule so the icon brightens to --primary-contrast along
  with the label, matching the chevron/text behaviour.
- Override the 1rem max-width reserve inherited from
  .docs-faceted-list-item-text by chaining both classes the span carries
  (.docs-external-link.docs-faceted-list-item-text), so the icon lines up
  with the chevrons at the link's end-padding. Using :host was avoided
  because it breaks the nested `a:hover &` selector.

(cherry picked from commit 00226e7d80)
2026-06-30 17:23:30 -07:00
Shuaib Hasan Akib b235278699 fix(docs-infra): support header values containing apostrophes
Update the `headerRule` regex to capture the complete quoted header value. The previous pattern excluded quote characters from the content and failed to parse headers such as:

```angular-ts {avoid, header: "Can't inject interface"}
```

The new pattern matches everything between the opening and closing quote delimiters.

(cherry picked from commit 3f9d0ee985)
2026-06-30 17:22:40 -07:00
Alex Rickabaugh af7edd90ca Revert "fix(compiler-cli): include toSignal in debugName transform"
This reverts commit 165995285c. Reason: breaking
in g3 (ngDevMode not defined)

(cherry picked from commit a5f1b20373)
2026-06-30 13:24:21 -07:00
Matthieu Riegler b5ea3408ce refactor(compiler): remove visitAttributeComment
In #69463 we forgot to rename the visitor method after renaming the node class

(cherry picked from commit 74803c75cd)
2026-06-29 16:00:07 -07:00
aparziale ca76b2cca1 docs(forms): correct signal field access in form model example
The `myForm` field is a callable `FieldTree`, so its value must be read
via `this.myForm().value()`. Fixes two examples that incorrectly used
`this.myForm.value()`.

(cherry picked from commit e653a7bf30)
2026-06-29 14:49:42 -07:00
Paweł Maniecki baf09a9939 fix(compiler-cli): include toSignal in debugName transform
the toSignal function received a debugName option in 0812ac3bec,
but was not covered by the signalMetadataTransform which sets the debugName in dev mode
automatically.

(cherry picked from commit 165995285c)
2026-06-29 14:32:22 -07:00
cynavi 0c18ccb87c docs(docs-infra): fix typo and malformed markdown bullet in angular-developer skill
(cherry picked from commit 433993efa8)
2026-06-29 14:24:27 -07:00
Hien Pham 32c1f30a39 docs: update Vitest configuration option from configFile to runnerConfig
(cherry picked from commit d109cc5e9d)
2026-06-26 10:36:53 -07:00
Bhuvansh855 592e9d2e30 docs: reorder streaming resources description
(cherry picked from commit 9142712e06)
2026-06-26 10:35:33 -07:00
Bhuvansh855 dcb026bacb docs: document resource stream usage
(cherry picked from commit 9c9ead95d6)
2026-06-26 10:35:32 -07:00
Charles 60bb1a710f docs: streamline and update mcp server setup documentation
Update and streamline the Model Context Protocol (MCP) server setup guide. This includes revising tool descriptions, replacing multiple experimental tools with a single target runner option, updating configurations for supported IDEs, and removing obsolete setup sections.

(cherry picked from commit f7cb609770)
2026-06-26 10:34:41 -07:00
Karim Daher 9dff7f48c5 docs: disable overlay close-on-escape in Aria menubar examples
The Aria menubar examples render each menu in a `cdkConnectedOverlay`,
which detaches the top-most overlay on every Escape keypress
(`disableClose` defaults to `false`). The top-level menus are always
attached, so a detached overlay never reattaches and its `viewChild`
reference becomes `undefined`. Holding Escape detaches the overlays one by
one, permanently breaking menus such as "Insert" and "Format".

Set `cdkConnectedOverlayDisableClose` on the example overlays so the menu
pattern remains the single owner of open/close state, matching the
combobox and toolbar examples. Applied to the basic, disabled, and rtl
menubar examples (and their material/retro variants).

(cherry picked from commit db2101c994)
2026-06-26 10:33:26 -07:00
tmpln e598dc843f fix(core): improve input writes migration in best effort mode
Currently, signal migration schematics in best effort mode doesn't do a very good job migrating input writes when there is a nested property access in templates.

In event handlers, no attempt is made to migrate a nested access in the left-hand-side of assignments or anything in their right-hand-side. E.g., nothing will happen here:

`(ngModelChange)="inputD.prop = $event + inputF"`.

Additionally, when a migration attempt is made, parentheses are often incorrectly placed on the parent, both in event handlers and two-way bindings:

`(ngModelChange)="inputC = $event"` is migrated to `(ngModelChange)="inputC = $event()"`.

`[(ngModel)]="inputB.prop.prop"` is migrated to `[(ngModel)]="inputB.prop().prop"`.

(cherry picked from commit 74638cab84)
2026-06-26 10:31:01 -07:00
Alex Rickabaugh 0b1cbbd12f release: cut the v22.0.4 release v22.0.4 2026-06-26 10:04:16 -07:00
aparziale fd37f09f37 fix(migrations): resolve migration failure when tsconfig specifies rootDir
When `rootDir` was set in a project's tsconfig (e.g. `rootDir: "src"`),
tsurge-based migrations would fail because `projectRoot` was derived from
`rootDir`, causing `rootRelativePath` to be computed relative to `src/`
instead of the workspace root. This produced paths like `app/app.ts`
instead of `src/app/app.ts`, which the DevKit tree could not resolve.

Fix by overriding `info.projectRoot` to `absoluteFrom(info.program.getCurrentDirectory())`
immediately after program creation, ensuring workspace-relative paths are
used for all tree updates.

(cherry picked from commit 26b0c719ef)
2026-06-26 09:14:52 -07:00
Alan Agius 5ba6443e12 release: cut the v22.0.3 release v22.0.3 2026-06-25 17:10:29 +02:00
kirjs f4f7f3755c fix(compiler): remove unused import breaking CI in 22.0.x
The import of createContentBlock from ./r3_content_blocks was erroneously included in a cherry-pick but the file does not exist in this branch.
2026-06-25 06:59:05 -04:00
JoostK f90c20df40 fix(compiler): account for NgModule dependencies in JIT-compiled partial declarations
When partial declarations are not preprocessed to AOT by the linker, the `ngDeclareComponent`
call causes them to be compiled ad-hoc. In this mode, NgModule imports in standalone components
would be dropped, deviating from the linker. This commit changes the ad-hoc compilation of
component declarations to pass the NgModule imports along just like the linker does.

Fixes #69451

(cherry picked from commit ecd047578e)
2026-06-24 14:46:48 -04:00
Matthieu Riegler 489d1707d7 refactor(compiler): desable the legacy template syntax
This disables the legacy `bind`, `bindon-`, `on-`, `let-` `ref-` syntax in g3 ONLY.
This is mostly to evaluate the blast radius

(cherry picked from commit f9c4b71488)
2026-06-24 14:35:17 -04:00