Commit Graph

37902 Commits

Author SHA1 Message Date
leonsenft 248d4e5397 release: cut the v22.1.0-next.5 release v22.1.0-next.5 2026-07-08 14:46:50 -07:00
leonsenft 099c5c6dc7 docs: release notes for the v22.0.6 release 2026-07-08 14:38:36 -07:00
Matthieu Riegler 25b7afa515 Revert "fix(forms): allow multiple async validators"
This reverts commit 953cdfd66a.
2026-07-08 13:03:48 -07:00
Kam 3ac2c7b2bc feat(docs-infra): add Angie mascot to the not found page
Replaces the plain "Page Not Found" text with the sad Angie mascot
speaking the message from a speech bubble, for a warmer, more on-brand
not-found page. Copy is unchanged and the "Feeling lucky?" search
results are untouched.

The sad pose is added as an SVG asset (cropped tight to the artwork) under
assets/images/angie/. The mascot is decorative (aria-hidden), and it scales
down to stay beside the bubble on mobile.
2026-07-08 12:45:43 -07:00
franmc01 eac04cfb16 docs: clarify runtime component comparison in elements guide
The popup service example framed the comparison against a vague
'previously you had to define a dynamic component' workflow and pointed
readers at steps no guide describes. Compare against today's
programmatic rendering approach with createComponent instead, which is
what the accompanying example actually uses, and link to the
programmatic rendering guide.

Also remove the note about excluding the component from compilation,
which no longer applies to standalone components.

Fixes #55148
2026-07-08 12:19:55 -07:00
Kam 95fbd0bd48 feat(docs-infra): add Angie mascot to adev empty and error states
Several adev states show only plain text today. This brings the Angie
mascot into them for warmer, more on-brand empty states, with no change
to copy or behavior:

- Search dialog: a magnifying-glass Angie on "Start typing to see
  results", a questioning Angie on "No results found".
- API reference: a questioning Angie on "No API items found." and on the
  package filter's "No results found".
- Deprecated API pages: the back-turned orthos pose in the shared
  deprecation warning.

The mascots are decorative (aria-hidden) and sized per placement; the
poses are added as SVG assets under assets/images/angie/.

Also moves the Shiki highlighter init in the jsdoc-transforms spec into a
beforeAll, fixing a flake where the spec failed under randomized test
order.
2026-07-08 12:18:42 -07:00
Matthieu Riegler c0eaaedef3 refactor(core): cleanup Meta service
The service had a rather old implementation. This is mostly a cleanup.
2026-07-08 11:23:54 -07:00
volkanfilazi 8e8c5524bb removed console log 2026-07-08 11:23:00 -07:00
volkanfilazi b542302a23 fix(forms/signals): make extractValue reactive for compat AbstractControl values 2026-07-08 11:23:00 -07:00
ZorphDark 3cd98ffc1f docs: update e2e-testing guide and skill for official integrations 2026-07-08 11:20:01 -07:00
Bhuvansh855 39ea1c559f docs: fix grammar and punctuation issues in guides 2026-07-08 10:46:32 -07:00
Matthieu Riegler 4e4eb6b707 docs: update optional chaining behavior
+ mention the `$safeNavigationMigration` magic function
2026-07-08 10:46:04 -07:00
Matthieu Riegler d93e922517 docs(forms): add jsdoc for ReadonlyFieldState 2026-07-08 10:45:31 -07:00
aparziale 43996cf748 docs: add global form state signals to signal forms guide
Add a new section for 'Form State Signals' in the signal forms essential guide. This documents global signals such as dirty(), valid(), invalid(), pending(), and touched() at the form level, as requested in issue #69544.

Fixes #69544
2026-07-08 10:42:18 -07:00
SkyZeroZx c1829f6d7c docs(docs-infra): Add build-time validation for API and guide links using route manifest
Adds build-time validation to catch broken, stale, or miscased internal documentation links in both JSDoc and markdown, including `/api/` and `/guide/` URLs and their fragments. Updates the documentation pipeline to share the canonical route manifest, ensuring that all references are checked against the current navigation structure.
2026-07-08 10:24:47 -07:00
Matthieu Riegler 42862f7df4 docs: update formatting 2026-07-08 08:54:18 -07:00
Ambati Mohan Kumar 95b7385cfb docs: fix import of AdminPage in Angular routing documentation. #69670 2026-07-07 16:46:38 -07:00
P4 eb2a8ff63f fix(compiler-cli): apply debugName transform to required signal queries
Transform assumed `.required` functions always take options as the first argument.
This is true for `input` and `model`, but not for `viewChild` and `contentChild`,
which take the same arguments as non-required versions.

Change the code to put options for signal queries in the right position,
causing debugName to be correctly generated for signal queries.
2026-07-07 11:05:22 -07:00
Angular Robot c3e688f102 build: update all non-major dependencies
See associated pull request for more information.
2026-07-07 11:04:31 -07:00
Angular Robot 2f8134bdf5 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-07-07 10:51:06 -07:00
Aleksander Bodurri 56847dc77a fix(devtools): highlight SVG and directive hosts correctly
Before SVG hosts could be skipped because the highlighter checked for HTMLElement. A case like <foreignObject appSvgDemo> would not get a proper overlay. The highlighter now works with Element so SVG hosts can be found and measured.

Before Directive only hosts could be skipped because the inspected-page lookup and directive explorer matched component hosts and component ids only. A case like <a routerLink="/todos">Todos</a> could highlight the parent component instead of the anchor, and the RouterLink only tree node could fail to select, highlight, or request an overlay. Id 0 could also miss the highlighted state because the tree treated it as absent. The lookup now stops at the nearest component or directive host, and tree matching accepts component and directive ids using null as the absent state.

Selected overlays could fail to reappear for the same element because unhighlighting removed the overlay but left the selected element cached. selected-element cache is now reused only while its overlay is still connected, and unhighlighting clears the cached element.

Overlay geometry used integer coercion. An SVG or transformed element with a 0.5px bounding box could get a 0px overlay. Overlay positioning now preserves fractional DOMRect values.
2026-07-07 10:18:37 -07:00
Cameron Smick bf6dba878e refactor(core): move devtools ai tool definition types to primitives
Extract the AI tool definition interfaces from the core debug module to the devtools primitives module. This relocates ToolDefinition, ToolGroup, and DevtoolsToolDiscoveryEvent to the primitives folder, exposing them cleanly via "export type" in the devtools entry point, improving module organization and readability.
2026-07-07 10:18:05 -07:00
Kam 6edabc64e5 refactor(vscode-extension): remove duplicated getTokenAtPosition in completions handler
The completions handler kept a local copy of getTokenAtPosition plus three stale TODO comments noting the duplication, but the function is already exported from server/src/utils.ts (hover.ts and others import it from there). Drop the local copy, import the canonical one, and remove the now-meaningless comments.
2026-07-07 10:11:02 -07:00
rootvector2 e5c37f21de fix(router): use safe hasOwnProperty when parsing query params
`parseQueryParam` and the AngularJS-compat `parseKeyValue` accumulate query params into a plain object and check key presence with `obj.hasOwnProperty`, so a `hasOwnProperty` query key clobbers the method and the next lookup throws `TypeError`. Switch both to `Object.hasOwn`, which can't be shadowed by a query key.
2026-07-07 10:09:34 -07:00
cexbrayat fbb705e6fd fix(migrations): remove stale model import in model-output migration
Remove the model import after migrating all model() usages in a file.
2026-07-07 10:08:43 -07:00
arturovt ab618bdc0f refactor(compiler-cli): use BindingType enum check in suffix-not-supported extended diagnostic
Replaces the `node.keySpan.toString().startsWith('attr.')` string allocation in the `suffixNotSupported` extended template check with an O(1) `node.type === BindingType.Attribute` enum comparison.

The diagnostic message string is also extracted to a module-level constant so it is created once at module load time instead of on every diagnostic emit.

Additionally, this change adds missing test coverage for the `.%` and `.em` suffixes, as well as for a plain `attr.` binding without a style suffix.

Measured with a 100-iteration microbenchmark before and after the change (MacBook Pro 2018, Intel CPU):

```ts
const start = performance.now();
for (let i = 0; i < 100; i++) {
  new ExtendedTemplateCheckerImpl(templateTypeChecker, program.getTypeChecker(),
    [suffixNotSupportedFactory], {}).getDiagnosticsForComponent(component);
}
console.log((performance.now() - start) / 100, 'ms/iter');
```

Before: `~0.24 ms/iter`
After: `~0.14 ms/iter` (~40% faster)
2026-07-07 10:05:05 -07:00
Ben Hong b340e44a86 docs: add signal forms testing guide 2026-07-07 10:03:17 -07:00
cexbrayat eac363e92e fix(compiler-cli): detect uninvoked signals in bound expressions using ternary
Extend the interpolated signal extended diagnostic to inspect ternary-bound expressions and report uninvoked signal reads in bound bindings.

```
<div [style.width]="width() ? 1 : width"></div>
```

where the false branch should invoke the signal as `width()`.
2026-07-07 10:01:49 -07:00
SkyZeroZx 0a5a2b768c fix(migrations): preserve transitive NgModule references when pruning
avoids unintended removal of indirectly required modules

Fixes #62865
2026-07-07 10:01:10 -07:00
Kam 5ec0b1668b fix(docs-infra): disable nav-list tooltip on mobile
On mobile, focusing a long nav item shows a matTooltip that escapes the
drawer, ignores inner scroll, and blocks scrolling while open. Suppress
it on mobile using the existing isMobile helper.
2026-07-07 09:54:47 -07:00
Kam 4b0c066e22 fix(docs-infra): keep mobile nav open when closing the search dialog
Backdrop clicks on the search dialog were also closing the open mobile nav drawers. Adds an id to `<dialog>` and references it from both navs' `docsClickOutsideIgnore` arrays.
2026-07-07 09:54:14 -07:00
Ben Hong 7dd35913b6 docs: add composability section to custom controls signal forms 2026-07-07 09:52:17 -07:00
arturovt 73ab88e65b refactor(forms): avoid unnecessary Set allocation in maybeRemoveStaleArrayFields
Three small, behavior-neutral cleanups to maybeRemoveStaleArrayFields:

1. Avoid allocating an empty Set when prevData.byTrackingKey is
   undefined. new Set(undefined) previously created an unused empty
   Set on every call for parents with no tracking keys.

2. Guard the per-element tracking-key check on `oldTracking` being
   defined, skipping the isObject/hasOwn check entirely when there's
   nothing to track.

3. Replace childValue.hasOwnProperty(identitySymbol) with
   Object.hasOwn(childValue, identitySymbol). hasOwnProperty throws
   on null-prototype array elements (Object.create(null)), which
   would crash computeChildrenMap. Object.hasOwn is null-prototype-safe
   and preserves "own property" semantics (does not match inherited
   identitySymbol values).

4. Replace `data.byTrackingKey?.delete(id)` with
   `data.byTrackingKey!.delete(id)`. The optional chaining was dead:
   if oldTracking.size > 0, prevData.byTrackingKey (and therefore
   data.byTrackingKey, same Map reference via the spread) is always
   defined. The `?.` masked this invariant; `!` documents it and
   would surface a runtime error instead of a silent no-op if the
   invariant is ever violated.

Verified via performance.mark/measure instrumented directly inside
the function (count=1 call for a single-field edit in both cases).
Total duration dropped from ~0.7ms to ~0.1ms, consistent with the
avoided Set allocation in (1) and (2).
2026-07-07 09:51:44 -07:00
Angular Robot 3da6d058d3 build: lock file maintenance
See associated pull request for more information.
2026-07-07 09:48:35 -07:00
Shuaib Hasan Akib 01bb0a2f28 refactor(core): remove unused utility functions
Remove `isIterable` from `util/iterable.ts` and
`newTrustedFunctionForDev` from `util/security/trusted_types.ts`
as they are no longer referenced anywhere in the codebase.
2026-07-07 09:48:06 -07:00
Angular Robot 8f7dc479de build: update dependency @mcp-b/webmcp-types to v4
See associated pull request for more information.
2026-07-07 09:46:23 -07:00
moraisacr e91046ffdb docs(ai-tutor): add troubleshooting for MCP setup issues 2026-07-07 09:36:56 -07:00
Ben Hong d837d6270a docs: add signal forms dynamic forms with json guide
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2026-07-07 09:27:15 -07:00
Hien Pham 1f6b1cee22 docs: enhance readability of utility methods section in testing guide 2026-07-07 09:20:23 -07:00
Hien Pham cfe847eea8 docs: improve readability of inject, initTestEnvironment, and resetTestEnvironment descriptions 2026-07-07 09:20:23 -07:00
Jan Pilzer f3e2b6bf6a docs(docs-infra): Social & Theme menu placement
Bottom align menus with trigger buttons
Align height of social link icons
2026-07-07 09:19:43 -07:00
marktechson c587555fdd docs: updates press kit
Adds a link to Angular's official mascot, Angie! Community members can now have access to Angie for use that falls within the community guidelines.
2026-07-07 09:18:54 -07:00
Shuaib Hasan Akib 81dd9d6091 docs: fix code snippet formatting and highlight lines
Correct a mismatched line highlight in the documentation examples
and convert tags to the preferred self-closing format for consistency.
2026-07-07 09:15:39 -07:00
SkyZeroZx 901eb4607a docs: clarify HttpClient default provider 2026-07-07 09:14:40 -07:00
Shuaib Hasan Akib cf70bcfef8 docs: update component and directive decorator examples to use concise syntax 2026-07-07 09:14:13 -07:00
Aleksander Bodurri 910557d062 docs(devtools): document how the extension connects to a tab
Add an architecture doc tracing how the Angular DevTools panel, background worker, content scripts, and backend connect per tab and relay messages, with diagrams for the topology and boot sequence.
2026-07-07 09:12:32 -07:00
Sebastian Barfurth 19a66dcc15 docs: point out interoperability of custom Signal Form controls
Any custom Signal Form control
[will actually work](https://github.com/angular/angular/issues/69074#issuecomment-4601225278)
in both Reactive and Template-Driven form contexts. However, this is not obvious
from reading the docs. This PR points this out very explicitly in both the
migration and custom control guide for Signal Forms.

One notable advantage of this interoperability behavior is the ability to
migrate existing `ControlValueAccessor` controls without breaking users. I've
pointed this out separately.
2026-07-07 09:11:41 -07:00
leonsenft a19c02706f refactor(compiler-cli): support foreign imports with isolated declarations
Previously, extracting foreign component imports relied on the partial
evaluator and semantic import resolution to locate declaration
references across files. This resolver-based approach is incompatible
with isolated declarations and local compilation, where cross-file type
information and full semantic resolution are unavailable.

Replace the resolver-based foreign import evaluation with a lightweight,
AST-based extraction mechanism (`extractForeignImportsFromAst`). This
allows the compiler to extract foreign component names and raw AST
expressions directly from syntax trees during the analysis phase without
requiring full type checking.

Additionally, simplify the `ForeignComponentMeta` interface by removing
the obsolete reference property and implement granular AST diagnostics
that provide actionable error messages and usage examples when invalid
expressions are passed to `foreignImports`.
2026-07-07 09:10:21 -07:00
arturovt 806a3ada26 docs: add NG05200 error reference page for SANITIZATION_UNSAFE_SCRIPT
Adds a reference page for `NG05200`, thrown by `DomSanitizer` when a value is bound to a `<script>` element without being marked trusted via `bypassSecurityTrustScript`. Covers why Angular rejects script content outright, how to reproduce the error, the escape hatch, and the XSS caveat.
2026-07-07 09:09:49 -07:00
Angular Robot 731d665a86 build: update babel monorepo to v8
See associated pull request for more information.
2026-07-06 14:05:15 -07:00