Commit graph

37435 commits

Author SHA1 Message Date
Matthieu Riegler
8fc6fe0346
Merge 13ccce9fe4 into d8c871ef80 2026-05-22 12:11:38 -05:00
Andrew Scott
d8c871ef80 refactor(vscode-extension): Remove effectively dead code
Since bundled path is at the start of probe locations, it's always going to be found first.
Workspace versions will never be used. getProbeLocations is effectively dead and confusing code.
2026-05-22 09:58:22 -07:00
Andrew Scott
3403e79f9f fix(vscode-extension): restrict jsdoc markdown trust and harden document opening
Restrict JSDoc hover links to the custom openJSDocLink command and implement document
opening using safe workspace APIs.
2026-05-22 09:56:25 -07:00
Andrew Scott
4f4820f410 fix(vscode-extension): prompt for confirmation before loading workspace tsdk
Harden the typescript.tsdk and js/ts.tsdk.path settings loading
in the VS Code extension client.

This change hardens tsdk loading by:
1. Ignoring workspace-level tsdk paths in untrusted workspaces.
2. Prompting the user for explicit confirmation before loading a
   workspace-level tsdk path in trusted workspaces, and saving the
   approval state in a secure, local workspaceState.
2026-05-22 09:52:14 -07:00
Angular Robot
dfbe7a6ecd build: update github/codeql-action action to v4.35.5
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Performance Tracking / list (push) Waiting to run
Performance Tracking / workflow (push) Blocked by required conditions
OpenSSF Scorecard / Scorecards analysis (push) Waiting to run
See associated pull request for more information.
2026-05-21 13:21:30 -07:00
Angular Robot
23e744ec25 build: update all non-major dependencies
See associated pull request for more information.
2026-05-21 13:16:22 -07:00
arturovt
1563aae118 perf(forms): avoid redundant invalidations in parser errors signal
The `errors` linkedSignal in `createParser` had no equality check, so
every reset or recomputation — even to an identical empty array — would
mark downstream dependents as dirty and trigger unnecessary re-renders.

Add `shallowArrayEquals` as the equality function so the signal only
notifies dependents when the error list actually changes.
2026-05-21 10:57:50 -07:00
tjshiu
f84653605a docs: modernize autocomplete examples and guide to signal apis
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Performance Tracking / workflow (push) Blocked by required conditions
Performance Tracking / list (push) Waiting to run
OpenSSF Scorecard / Scorecards analysis (push) Waiting to run
2026-05-21 08:54:04 -07:00
Matthieu Riegler
13ccce9fe4 refactor(core): extend sanitization test coverage
This ensures that #68576 actually fixed a sanitization issue on uppercase elements/attributes
2026-05-21 02:07:50 +02:00
leonsenft
fd6ef34ac9 docs: release notes for the v22.0.0-rc.1 release
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Performance Tracking / list (push) Waiting to run
Performance Tracking / workflow (push) Blocked by required conditions
OpenSSF Scorecard / Scorecards analysis (push) Waiting to run
2026-05-20 15:51:15 -07:00
leonsenft
16195d00bf docs: release notes for the v21.2.14 release 2026-05-20 15:36:37 -07:00
Kam
04f31cce3e docs: link to ng new reference from installation guide
The installation guide walks a developer through `ng new <project-name>` but provides no link to the `ng new` CLI reference, leaving every option the command supports undiscoverable from the install flow. Link `ng new` in the prose to the reference page so options are one click away.
2026-05-20 14:09:32 -07:00
arturovt
3b8503f960 docs: document FormBuilder.group() controlsConfig value shapes
Some checks failed
DevInfra / assistant_to_the_branch_manager (push) Has been cancelled
The `@param` JSDoc for `FormBuilder.group()` previously described the argument only as “a collection of child controls”, without explaining the four supported value shapes:

* a raw value
* a `FormControlState`
* a `ControlConfig` tuple
* a pre-built `AbstractControl`

The fact that the second element of a `ControlConfig` tuple can accept `AbstractControlOptions` (for example to configure per-control `updateOn`) was especially non-obvious and undocumented.

This change adds a `@usageNotes` section with concrete examples covering each supported shape.

Closes #43984
2026-05-20 14:07:53 -07:00
Douglas Parker
c7e08ebe59 docs: add WebMCP docs
Adds initial documentation of experimental WebMCP APIs.
2026-05-20 14:06:15 -07:00
tjshiu
069b0153aa docs: simplify multiselect examples by removing scroll resets 2026-05-20 14:04:12 -07:00
tjshiu
36500a70e3 docs: simplify multiselect overlay bindings and transitions
Remove the delayed overlayOpen signals and synchronization effects across all 9 multiselect example variations. Bind cdkConnectedOverlayOpen directly to popupExpanded() and remove conditional closing classes to simplify code.
2026-05-20 14:04:12 -07:00
tjshiu
8fa7311c6e docs: modernize multiselect guide and standalone examples
Update the multiselect guide and all 27 interactive examples to utilize
the modern standalone, Signal-based Angular ARIA APIs.

* Modernize all examples (Standard, Material, Retro)
  to use standalone directives, animations, and focus suppression.
* Update the multiselect guide API tables and templates:
  - Document ngComboboxPopup, cdkConnectedOverlay, and disabled input.
  - Document ngListbox selectionMode, focusMode, tabIndex, and value signal.
  - Document activeDescendant active focus tracking with ngComboboxWidget.
2026-05-20 14:04:12 -07:00
tjshiu
62f8449453 docs: modernize select guide and examples 2026-05-20 13:56:47 -07:00
Kam
41a772ec0b docs: fix grammar slips on pipes guide
Fixes subject-verb agreement in the overview opener and date/currency example, a singular pronoun for a plural antecedent under change detection, and an "a object" -> "an object" a/an slip.
2026-05-20 13:51:50 -07:00
arturovt
d985957f09 docs: document barrel file caveat for @defer lazy chunks
Users often enable @defer expecting a separate lazy chunk but don't get
one, with no obvious error to explain why. The root cause is almost
always a barrel file import — the bundler treats the whole barrel as a
single module and can't split out individual exports.

Add a section to the defer guide that starts from the symptom (no lazy
chunk), shows the barrel import pattern that causes it, and gives the
direct-import fix.

Closes #52554
2026-05-20 13:47:42 -07:00
arturovt
de9e3d136e docs: document content projection limitations
Add a Limitations section to the content projection guide covering two
common footguns that aren't obvious from the feature description alone.

First, projected content lives in the declaring component's view, not
the receiving component's. This means OnPush on the receiving component
doesn't prevent projected content from being checked on every parent
cycle, and projected content can't see the receiving component's
viewProviders.

Second, some library components (menus, tabs, lists) use ContentChildren
to wire up keyboard navigation and ARIA behavior and assume they own
their children directly. Projecting external content into them tends to
break that behavior silently.

Closes #49679
2026-05-20 13:31:45 -07:00
SkyZeroZx
1a11ae81b3 docs: remove outdated best practice regarding change detection strategy in components 2026-05-20 13:30:28 -07:00
arturovt
ca44055166 docs: clarify ngDoCheck invocation behavior with OnPush strategy
The previous documentation for `DoCheck` / `ngDoCheck` implied that the
default change-detector had run on the directive itself, which is
misleading. `ngDoCheck` is actually invoked when the *parent's*
change-detector checks the directive's input bindings — meaning it fires
even for `OnPush` components whose own change detection was skipped.

Updated three places in lifecycle_hooks.ts:
- Interface description: scopes "the check" to input bindings in the
  parent template and adds an explicit OnPush callout.
- "detects changes" clarified to "detects changes to the directive's
  input bindings".
- Method description: "after the default change-detector runs" →
  "after the default change-detector has checked the directive's input
  bindings in the parent template".

Fixes #48140
2026-05-20 11:12:06 -07:00
Angular Robot
4104207913 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-05-20 11:09:39 -07:00
Angular Robot
cb957238cb build: update bazel dependencies
See associated pull request for more information.
2026-05-20 10:44:19 -07:00
Kam
745ee71c25 fix(docs-infra): make absolute angular.dev hrefs relative in CLI option descriptions
CLI option descriptions are sourced from `@angular/cli` schema JSON
files, several of which contain absolute `https://angular.dev/...` URLs
in their `description` text. Those URLs render with the external-link
icon and push preview users out to production when viewed on
`next.angular.dev` or other dev previews. The path bypasses the existing
`link.mts` ban on absolute angular.dev links because option descriptions
go through `marked.parse` directly, without `AdevDocsRenderer`. Rewrite
the rendered hrefs whose values begin with `https://angular.dev/` (or
the `http:` variant) to root-relative paths so the resulting anchors
route through Angular's Router and resolve against the active
deployment. Subdomains such as `next.angular.dev/...` are intentionally
not rewritten because they refer to genuinely different deployments.

Closes #68795
2026-05-20 10:28:27 -07:00
Angular Robot
2953ca7b0d build: update pnpm to v11.1.3
See associated pull request for more information.
2026-05-20 10:19:39 -07:00
Angular Robot
6ff3256b90 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-05-20 10:11:57 -07:00
Alan Agius
b70515cada docs: update supported Angular versions table to reflect v19 end-of-life status 2026-05-20 10:09:56 -07:00
arturovt
03161dc114 docs: clarify viewProviders visibility with projected content
The providers vs. viewProviders section explained what happens but not
why — specifically, why projected content can still access a parent
component's viewProviders. Added an explanation that DI follows where
content was declared, not where it's rendered, so projecting a component
into a child's ng-content cuts off the child's viewProviders but leaves
the declaring component's viewProviders reachable.

Closes #49202
2026-05-20 10:09:02 -07:00
leonsenft
d89b707019 test(core): remove obsolete SVG script sanitization translation test
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Performance Tracking / list (push) Waiting to run
Performance Tracking / workflow (push) Blocked by required conditions
OpenSSF Scorecard / Scorecards analysis (push) Waiting to run
Removes the `should throw error on translated SVG script ResourceURL
attributes` integration test from `security_integration_spec.ts`.

This test is now obsolete because SVG `<script>` elements are stripped during
template compilation (implemented in 90494cd909). As a result, they are no
longer present in the compiled template to trigger runtime sanitization,
causing this test (which expected a sanitization error to be thrown) to fail.
2026-05-19 18:02:43 -07:00
leonsenft
933608c07f fix(core): synchronize core sanitization schema with compiler
https://github.com/angular/angular/pull/68689 recently updated the compiler
schema which should be kept in sync with the core schema. Fix applied by
running `pnpm bazel run //packages/core:dom_security_schema`.
2026-05-19 18:02:43 -07:00
tmpln
048817dfa7 fix(core): visit ICU expressions in signal migration schematics
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Performance Tracking / list (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Performance Tracking / workflow (push) Blocked by required conditions
OpenSSF Scorecard / Scorecards analysis (push) Waiting to run
Before this fix ICU expressions were not migrated.
2026-05-19 13:58:08 -07:00
leonsenft
7c60a98b3c fix(compiler-cli): support import aliases in foreignImports (#68674)
Correctly matches and resolves foreign components when imported under an alias
name inside the component file.

PR Close #68674
2026-05-19 13:42:10 -07:00
leonsenft
d596d8bd0a refactor(compiler): support matching and validating foreign components in templates (#68674)
We extract the identifier name from the `foreignImports` expression in
`ComponentDecoratorHandler` and use a `SelectorlessMatcher` to match element
tags against these names. If an element matches both a regular Angular
directive and a foreign component, a conflict error is thrown.

In addition, we implement strict template semantic validation for these matched
foreign components within `TemplateSemanticsChecker`. Elements matched as
foreign components only support static attributes and property bindings. Any
event bindings, template references, or non-property input bindings (e.g.
class, style, or attribute bindings) trigger a semantic error diagnostic.

Finally, we skip standard DOM schema checks for foreign components to prevent spurious
validation errors since foreign components are not defined in standard HTML schemas.

PR Close #68674
2026-05-19 13:42:10 -07:00
aparziale
8ebc900067 docs: update HTTP testing setup guidance
Update testing documentation clarify HttpClient testing providers

Fixed #68792
2026-05-19 13:41:13 -07:00
Angular Robot
b53fa3cdaa build: lock file maintenance
See associated pull request for more information.
2026-05-19 13:22:40 -07:00
g.turri
4e55ceafc9 docs: Fix accepted Provider type in doc snippet
out of the box my IDE tells me there an error on

    const testProviders: Provider[] = [provideHttpClient(), provideHttpClientTesting()];

because `provideHttpClient()` returns an `EnvironmentProviders` so
I can't put it in a variable of type `Provider[]`
2026-05-19 13:19:33 -07:00
june-by
c49661b57b docs(compiler): add typeCheckHostBindings option to angular compiler options 2026-05-19 13:09:25 -07:00
SkyZeroZx
d251c0bf87 docs: Adds lazy service loading for best practice performance 2026-05-19 13:08:53 -07:00
Kam
96ba942a91 refactor(compiler): sync compiler_facade_interface replica with main
The replica at packages/core/src/compiler/compiler_facade_interface.ts drifted from the main copy. The file header specifies syncing via `cp main replica`; running it fixes field-order drift and relocates `legacyOptionalChaining?: boolean;` back onto R3DeclareDirectiveFacade (it was incorrectly on R3DeclareComponentFacade in the replica).
2026-05-19 13:07:05 -07:00
Georgi Serev
116b4cd936
fix(devtools): cluster-to-cluster relationships in signal graph
The PR addresses a missing step in the clustering phase of the signal graph processing on the DevTools frontend. Cluster-to-cluster relationship were missing from the graph, so the change fixes that.
2026-05-19 13:06:37 -07:00
Alan Agius
90494cd909
fix(compiler): strip namespaced SVG script elements during template compilation
Ensures that namespaced <script> elements (such as :svg:script) are correctly classified as PreparsedElementType.SCRIPT by the template preparser and stripped during compilation to prevent potential XSS vulnerabilities. Consequently, obsolete security schema mappings and runtime sanitization checks for <script> attributes have been removed since these elements are never present in compiled template outputs.
2026-05-19 13:06:00 -07:00
Cameron Smick
dbceef6221 refactor(devtools): make the DevToolsNode element property optional
The Angular DevTools Extension doesn't use the `element` property in Client-Only Wiz apps. Once the new `ng.getComponentForest`` function is implemented, Client-Only Wiz could provide `ComponentTreeNode`s without an `element` property. This change supports that case by making the `element` property optional.
2026-05-19 13:04:49 -07:00
Cameron Smick
3c255bccc1 refactor(devtools): Modify buildDirectiveForest to set default values for properties that will not be included in the forest returned by non-Angular frameworks.
Set default values for the `directives`, `element`, `hydration`, and `component.isElement` properties of every `ComponentTreeNode` returned by `ng.getComponentForest` for non-Angular apps.
2026-05-19 13:04:15 -07:00
Cameron Smick
0cf8a61e58 refactor(devtools): add optional injector property to DevToolsNode and IndexedNode types
Add an optional injector property to the DevToolsNode and IndexedNode types. Features that require an injector use the injector stored on the node, if it exists, and fall back to getInjectorFromElementNode if it doesn't.
2026-05-19 13:04:15 -07:00
Cameron Smick
50c0ce8275 refactor(devtools): Modify buildDirectiveForest to call ng.getComponentForest if it exists.
A new ng global function, ng.getComponentForest, is being added to allow the framework to provide the component forest without writing metadata to the DOM. This will allow devtools to display components that don't render any DOM.
2026-05-19 13:04:15 -07:00
arturovt
8ec0d1eee8 fix(router): skip scroll-to-top on initial navigation when hydrating
When scrollPositionRestoration is enabled and the app hydrates an
SSR-rendered page, RouterScroller was unconditionally scrolling the
viewport to [0, 0] on the first imperative navigation. This discards
any scroll position the user established while the server-rendered
page was loading.

Fix by injecting IS_HYDRATION_DOM_REUSE_ENABLED into RouterScroller
and suppressing the scroll-to-top for the initial navigation only.
Subsequent navigations are unaffected.

Closes #64578
2026-05-19 13:01:53 -07:00
Alan Agius
61a97f22e8
fix(core): support prefix-insensitive DOM schema lookups and compile-time i18n attribute validation
Updates `DomElementSchemaRegistry` to strip `:svg:` and `:math:` namespace prefixes
from tag names before querying `SECURITY_SCHEMA` at compile-time. This allows SVG
and MathML attributes to correctly match their security contexts during compilation.
2026-05-19 13:00:32 -07:00
Andrew Scott
ad37f52c12 fix(router): Add strict typing on 'getResolvedTitleForRoute'
The title property in Router type already requires that the return type of a resolved
title is a string. The type was looser here only because 'data' values are typed
as 'any'.

BREAKING CHANGE: The return type for `TitleStrategy.getResolvedTitleForRoute`
was previously 'any' while the actual return type could only be either `string`
or `undefined`. The return type now reflects the possible values correctly.
Code that reads the value may need to be adjusted.
2026-05-19 12:59:13 -07:00