38070 Commits

Author SHA1 Message Date
Joey Perrott 7c15737f50 release: cut the v22.1.1 release v22.1.1 2026-08-07 09:31:56 -07:00
lazerg 6f86d666ca docs: fix supported Node.js version in installation prerequisites
(cherry picked from commit 96b80424c7)
2026-08-04 17:31:07 +00:00
Matthieu Riegler ac3728e79f fix(http): avoid aborting completed requests in FetchBackend
Prevent AbortController.abort() from executing during Observable teardown when a FetchBackend HTTP request has already completed successfully or errored.
Previously, FetchBackend unconditionally called abort() upon stream termination. When requests completed normally, calling abort() after delivery caused Chromium-based browsers to mark the resolved request as net::ERR_ABORTED in DevTools due to a race condition, leading to missing response body payloads ("Failed to load response data"). By tracking whether the request has already settled—similar to XhrBackend checking for xhr.readyState !== xhr.DONE—we ensure abort() is only called for unsettled, in-flight requests upon unsubscription.

Fixes #70071

(cherry picked from commit ef4dfead83)
2026-08-04 16:37:39 +00:00
Angular Robot 82269f92ec build: update cross-repo angular dependencies
See associated pull request for more information.
2026-08-04 09:34:33 -07:00
SkyZeroZx f99e916ba7 refactor(common): modernize directive tests to rely on whenStable
Replace synchronous detectChanges calls with zoneless-compatible scheduling and stability waits in NgClass, NgStyle, and NgOptimizedImage tests.

(cherry picked from commit 2f0be5bef8)
2026-08-04 15:45:05 +00:00
Alan Agius 32af9b525e fix(http): strip RFC 6265 DQUOTE characters and handle URIError in parseCookieValue
Previously, `parseCookieValue` did not strip enclosing double quotes (`DQUOTE`) from quoted cookie values as specified in RFC 6265 Section 4.1.1. In addition, malformed percent-encoding in cookie values caused an unhandled `URIError` when calling `decodeURIComponent`.

(cherry picked from commit 280d09b160)
2026-08-04 15:29:50 +00:00
Matthieu Riegler 688a0a7118 fix(http): respect content-type charset in fetch backend text decoder
Extract the charset parameter from the Content-Type response header in FetchBackend and pass it to TextDecoder when decoding text and json responses. When no valid charset is provided or supported, gracefully fall back to default utf-8 decoding.

Fixes #70061

(cherry picked from commit 6a0789dc7f)
2026-08-04 15:28:27 +00:00
Angular Robot 6c6f3d346f build: lock file maintenance
See associated pull request for more information.
2026-08-04 08:26:26 -07:00
Shuaib Hasan Akib 3478df716e refactor(compiler): remove unused code and exports
Removes unused code and exports that are no longer referenced anywhere
in the compiler codebase.

(cherry picked from commit 337053ef1a)
2026-08-03 16:42:12 +00:00
Suraj Yadav 832ff2aff3 test(platform-server): add SSR integration test for null and normal input values
Fixes #69785

Add an Angular SSR integration test in platform-server verifying that null input values do not render string attributes like value="null" during server-side rendering, while normal non-empty string values like value="hello" are properly preserved.

(cherry picked from commit fb698d12cd)
2026-08-03 16:30:48 +00:00
Kam baff4d07aa fix(docs-infra): keep inline code in links as an atomic inline box
Inline code inside a link renders as a chip with its own background. Text
decoration propagates from the anchor and cannot be cancelled by a descendant,
so with the chip laid out as a regular inline box the link underline is drawn
straight across it.

Lay the chip out as an atomic inline box, which the propagated decoration is not
drawn across. This applies to the link rule only; code outside of links keeps
`display: inline` for wrapping in multiline paragraphs, and the link rule
already sets `white-space: nowrap`.

(cherry picked from commit efe1aae1cd)
2026-08-03 16:20:18 +00:00
SkyZeroZx 6b643ab037 refactor(common): modernize directive tests to rely on whenStable
Replace synchronous detectChanges calls with zoneless-compatible scheduling and stability waits. Preserve NgComponentOutlet coverage for components declared by NgModules.

(cherry picked from commit c9c4f2afc6)
2026-08-03 16:13:36 +00:00
Kam 79a819379f docs: fix roadmap link text and preview-site link
Two link issues on the roadmap page:

- "Introduce deferred loading" linked next.angular.dev, the preview build of
  this same site, for a page that exists here at guide/templates/defer. Use the
  relative path so readers stay on the stable docs.
- "Local template variables" linked "`@let` docs", putting a code chip and a
  plain word in one anchor. The anchor's underline crosses the chip and the two
  halves render in different colors. Link only the symbol, as the rest of adev
  does.

Also on the same page:

- Drop a stray space before a period in the Components card.
- Give the older completion labels the same "Completed in <quarter>" wording the
  newer cards already use.

(cherry picked from commit f2f12925bd)
2026-08-03 15:58:40 +00:00
Angular Robot 5e1d535868 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-08-03 08:56:14 -07:00
Matthieu Riegler 3d0067ad98 refactor(animations): remove outdated comment
This isn't necessary anymore.

(cherry picked from commit 1b13db7a1b)
2026-07-31 22:34:08 +00:00
SkyZeroZx aa6d3189c1 fix(core): initialize hydration triggers after late runtime activation
After incremental hydration became tree-shakable, application bootstrap could finish before a routed component activated the runtime. The one-time trigger scan was then skipped, leaving routed and nested hydration triggers uninitialized.

Coordinate application bootstrap with runtime activation and initialize once both have occurred.

Fixes #69908

(cherry picked from commit cfe2cda110)
2026-07-31 19:26:12 +00:00
Kam d6ec7c7c30 docs: document deprecated allowSignalWrites option in v19 update guide
The `allowSignalWrites` option of `effect()` became a no-op and was
deprecated in v19, but the update guide never mentioned it. Applications
upgrading from v18 or earlier still carry the option at their `effect()`
call sites, where it now only produces a dev-mode warning.

Add an entry to the v19 recommendations instructing those applications to
remove it, mirroring the wording of the deprecation notice on
`CreateEffectOptions`.

(cherry picked from commit 690eecda6b)
2026-07-31 15:40:00 +00:00
Jaime Burgos a13b968451 fix(http): run root interceptors in the terminal request chain
Represent withRequestsMadeViaParent() with an internal delegating backend so the interceptor handler can distinguish delegated clients from independent child configurations.

(cherry picked from commit bb78286e5e)
2026-07-31 15:32:18 +00:00
Angular Robot 115abc2191 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-07-31 08:30:24 -07:00
Angular Robot b3e03819a8 build: update pnpm to v11.18.0
See associated pull request for more information.
2026-07-31 08:23:04 -07:00
Angular Robot d2c21187ca build: update dependency node to v22.23.2
See associated pull request for more information.
2026-07-31 08:21:56 -07:00
Markus Mächler 8c6f5e7c30 docs: remove duplicate aria-hidden attributes in aria examples
(cherry picked from commit a37c79d7d4)
2026-07-30 22:22:18 +00:00
Kam 489fdb0da3 docs: fix self-referential link and merge intro tips in inputs guide
The "Customizing model inputs" section linked "standard input" back to
the inputs guide itself, a dead-end self-link. Point the sentence at the
relevant in-page sections instead (#required-inputs and #input-aliases).

Also merge the two stacked intro TIP callouts into a single tip.

(cherry picked from commit 5dd634d18d)
2026-07-30 22:20:45 +00:00
Angular Robot d107bcad3c build: update cross-repo angular dependencies
See associated pull request for more information.

Closes #69911 as a pr takeover
2026-07-30 10:04:35 -07:00
Aristeidis Bampakos 01eeee4bd1 docs: replace Firebase Studio references with Antigravity
(cherry picked from commit a0f943d53d)
2026-07-30 16:58:10 +00:00
SkyZeroZx 949de9c1fa refactor(forms): modernize reactive forms tests to rely on whenStable
Rely on zoneless scheduling throughout reactive forms tests instead of triggering change detection manually.

(cherry picked from commit 6deb6afcd1)
2026-07-30 16:06:33 +00:00
splincode deecb301c8 fix(core): warn when style property bindings receive invalid values
Report unsupported style property binding values in development mode while preserving existing binding behavior. Unwrap trusted style values before appending unit suffixes and link NG0318 warnings to the corresponding error guide.

(cherry picked from commit e43eb96341)
2026-07-30 16:05:51 +00:00
Jaime Burgos eb10e937fb refactor(common): modernize pipes & non bindable tests to rely on whenStable
Rely on zoneless scheduling throughout reactive forms tests instead of triggering change detection manually.

(cherry picked from commit d068fc1ea0)
2026-07-30 15:56:29 +00:00
splincode cc84776f75 refactor(compiler): replace any casts with precise types
- r3_factory: use `in` operator instead of `as any` property probing
  in isDelegatedFactoryMetadata / isExpressionFactoryMetadata type guards
- r3_deferred_triggers: narrow assignment to
  `DeferredBlockTriggers[typeof name]` instead of `as any`
- defer_resolve_targets / reify: drop unnecessary `as any` on
  `op.trigger` — `DeferTriggerBase.kind` is present on all union members
- pipe_creation: replace double `as any` with `as {target?: ir.XrefId}`,
  and reuse the already-narrowed `slotHandle` variable for the call
- extractor_merger: replace legacy `<any>console` guards with a proper
  `typeof console !== 'undefined'` check

(cherry picked from commit 5d76720e06)
2026-07-30 15:55:07 +00:00
Matthieu Riegler 644455b29e refactor(core): update acceptance test
- remove NgModules
- remove non-necessary TestBed.configureTestingModule
- remove non-necessary Eager strategy
- Drop usages of CommonModule

(cherry picked from commit d8a570ec4e)
2026-07-30 15:47:57 +00:00
Kam a956409d90 docs: update outdated and broken external links in adev
Several external links pointed at locations that have moved or gone away:

- ng-packagr, webpack, and node-glob renamed their default branch from
  master to main, so the deep links into those repos redirect.
- The npm package pages moved from npmjs.org to www.npmjs.com.
- The Angular Material and CDK docs moved from material.angular.io to
  material.angular.dev.
- The semver reference pointed at the defunct semver.io service; point it
  at the SemVer spec at semver.org instead.
- The MDN animationiteration event link had a typo (animationitration).
- compiler-cli's metadata/schema.ts was removed after v12; pin the link to
  the 12.2.x tag where the file still exists.
- The angularindepth.com article is gone (its domain is parked); link to its
  live home on the Angular In Depth Medium publication.
- Google moved the Lighthouse user-timing docs to developer.chrome.com.

Point the links at their current, working locations.

(cherry picked from commit 058c7f9b0c)
2026-07-30 15:43:39 +00:00
Angular Robot 6fcbd4bfcf build: update bazel dependencies
See associated pull request for more information.
2026-07-30 08:39:06 -07:00
Angular Robot a80ff5500c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-07-30 08:37:19 -07:00
lazerg c4b1432129 docs: document overlay stacking change in v21 update guide
(cherry picked from commit ae303c4a05)
2026-07-30 15:22:09 +00:00
Alan Agius 6d51b99950 ci: add branch tracking comments to dev-infra GitHub actions
Adds `# main` version comments after SHA references for `angular/dev-infra` GitHub Actions across workflows so that Renovate tracks the main branch and proposes updates when digests change.

(cherry picked from commit 32815d5472)
2026-07-30 15:16:38 +00:00
Alan Agius d366e4bd02 release: cut the v22.1.0 release v22.1.0 2026-07-29 22:39:16 +02:00
Kam 7825e607c8 docs: invoke signal inputs in adev examples and tutorials
Several adev example and tutorial files read a signal input as a bare
reference (this.foo) instead of invoking it (this.foo()). Because an
InputSignal is a function object, the bare reference is always truthy
and never yields the underlying value, so the surrounding guard or
binding silently did the wrong thing:

- animations open-close(.1/.3): the `!this.logging` guard in
  onAnimationEvent was always false, so the early return never fired.
- form-validation forbidden-name.directive: the `this.forbiddenName`
  ternary condition was always truthy, so validation ran even when no
  forbidden name was configured.
- first-app steps 12 and 14 housing-location: `housingLocation.photo`
  read `.photo` off the signal function (undefined), leaving the
  listing image src empty.

Invoke the signals so the examples reflect correct signal-input usage.

(cherry picked from commit 0d26130a4c)
2026-07-29 09:59:22 -07:00
SkyZeroZx c73dd603a4 refactor(forms): modernize signal forms tests to rely on whenStable
Rely on zoneless test scheduling instead of manually triggering change detection. Keep Signals Forms tests aligned with the async-first testing pattern.

(cherry picked from commit 59f6ef690b)
2026-07-29 09:57:42 -07:00
Shuaib Hasan Akib 098d28febf docs: fix self-referential link in defer block description
Replace broken  link with inline code
formatting. The link was pointing to the page itself, as no dedicated block concept page exists at that URL.
corrects 'everytime' to 'every time'.

Update tools/manual_api_docs/blocks/let.md

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit 21eed5f8d4)
2026-07-29 09:45:17 -07:00
Kam fcaf15a0a4 fix(docs-infra): fix undefined CSS custom properties in shared-docs styles
Two custom properties in the shared-docs styles reference tokens that are
defined nowhere, so the declarations are invalid at computed-value time.

_kbd.scss sets the <kbd> text color with var(---tertiary-contrast); the extra
leading dash points at an undefined property with no fallback, so the color
resolves to the inherited value instead of the intended --tertiary-contrast.

_colors.scss builds --light-pink-to-light-purple-horizontal-gradient from
var(--light-purple), which is not defined anywhere (the sibling token is
--light-violet, defined in the same file), invalidating the gradient. The
gradient is not currently referenced, so this corrects a latent malformed
declaration rather than a visible bug.

Point both at the defined tokens: --tertiary-contrast and --light-violet.

(cherry picked from commit e70994bdc3)
2026-07-29 09:44:41 -07:00
Shuaib Hasan Akib 79a37f3d0b refactor(common): replaces the deprecated positional subscribe arguments with the
recommended observer object

(cherry picked from commit ec87f04200)
2026-07-29 09:43:57 -07:00
SkyZeroZx 2591fa6bd9 docs: clarify behavior of credentials option during SSR on Node.js
(cherry picked from commit 90ac011fa9)
2026-07-29 09:41:33 -07:00
Kam a7d67f9ccc fix(docs-infra): fix malformed --webgl-page-background declaration
In the light theme block of _colors.scss, --webgl-page-background and
--webgl-gray-unfilled were written on a single line without a separating
semicolon, and --webgl-page-background wrapped --page-background in an
invalid nested var(). As a result --webgl-page-background got a garbage
value and --webgl-gray-unfilled was never defined in the light theme.

Split them into two well-formed declarations and drop the nested var(),
matching the structure already used in the dark theme block.

(cherry picked from commit 91822538fe)
2026-07-29 09:04:14 -07:00
Kam 9658ad0ca8 fix(docs-infra): define missing win95 variables in aria autocomplete examples
The retro-themed aria autocomplete examples style the clear button with
var(--win95-gray), var(--win95-dark-gray), var(--win95-light), and
var(--win95-shadow), but none of the three example stylesheets defines
those custom properties. The variables resolve to nothing, so the button
falls back to inherited theme colors — color: var(--win95-shadow) becomes
the light-theme text color in dark mode, leaving the button unreadable.

Define the four variables in :host of each example, matching the values
already used by the sibling aria tree examples, so the clear button keeps
its Windows 95 look in both light and dark themes.

(cherry picked from commit 8cd4c89c29)
2026-07-29 09:02:58 -07:00
Kam f5a968b003 fix(docs-infra): replace undefined --gray-50 in retro aria examples
The retro variants of the toolbar, select, and multiselect aria examples
tint the pressed button background with
color-mix(in srgb, var(--retro-button-color) 60%, var(--gray-50)), but
--gray-50 is defined nowhere. Per the CSS spec, a var() with no fallback
pointing at an undefined property invalidates the whole color-mix(), so the
declaration is dropped and the pressed-state tint never applies.

Define a local --retro-pressed-tint token in each example's :host (#fbfbfb,
the value $gray-50 resolved to) with a :host-context(.docs-dark-mode) override
to #151417, and use it for the pressed-state mix. This keeps the example
self-contained rather than depending on adev's global token scope, while
staying theme-aware in both light and dark, following the same token-flipping
pattern used in code-editor.component.scss.

(cherry picked from commit 48c1e5bb0f)
2026-07-29 09:00:00 -07:00
Angular Robot b11cdbd758 build: update pnpm to v11.17.0
See associated pull request for more information.
2026-07-29 08:57:34 -07:00
Kristiyan Kostadinov bbbd357bd2 fix(forms): add utility to assert that value is a field tree
Adds the `isFieldTree` utility that allows users to assert whether a value is a field tree. This is something that has come up on Material recently and will be useful for users as well.

Fixes #69984.

(cherry picked from commit 2a141847a5)
2026-07-29 08:53:29 -07:00
Matthew Beck b569f6e82b test(compiler-cli): add compliance case for @HostListener on a property
`@HostListener` is not limited to methods — it is equally valid on a property
holding a function, which is the idiomatic way to keep `this` bound:

    @HostListener('window:beforeunload', ['$event'])
    private onUnload = (event: BeforeUnloadEvent) => {...};

Every existing host-listener compliance case declares the handler as a method,
so the property form was uncovered. This adds a case exercising both a public
and a private function-valued property, one of them with a global (`window:`)
event target, and locks in the emitted chained `ɵɵlistener` calls plus
`ɵɵresolveWindow`.

Verified against all four compliance modes (full, partial/linked,
declaration-only); GOLDEN_PARTIAL.js regenerated via the golden update rule.

(cherry picked from commit d44b3224d9)
2026-07-29 08:52:58 -07:00
Matthieu Riegler 6dcb534e12 refactor(common): remove duplicate helper function
We have `useAutoTick` in our private shared utils.

(cherry picked from commit 36474f7011)
2026-07-29 08:49:21 -07:00
Maikel van Dort a3fb4fe052 docs: remove semicolon text node
(cherry picked from commit 9373d22a48)
2026-07-29 08:48:39 -07:00