Commit Graph

2814 Commits

Author SHA1 Message Date
Bhuvansh855 c4cb66e602 docs: improve introductory resource example 2026-06-30 18:00:03 -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
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
marktechson d791a7f496 docs: updated roadmap 2026-06-30 17:24:02 -07:00
yamanerkam 00226e7d80 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.
2026-06-30 17:23:26 -07:00
Shuaib Hasan Akib 3f9d0ee985 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.
2026-06-30 17:22:35 -07:00
aparziale e653a7bf30 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()`.
2026-06-29 14:49:38 -07:00
SkyZeroZx 7ea2a002f5 docs: add documentation for HttpClient response body size limit and related error NG02825 2026-06-29 14:27:26 -07:00
Hien Pham d109cc5e9d docs: update Vitest configuration option from configFile to runnerConfig 2026-06-26 10:36:49 -07:00
Bhuvansh855 9142712e06 docs: reorder streaming resources description 2026-06-26 10:35:28 -07:00
Bhuvansh855 9c9ead95d6 docs: document resource stream usage 2026-06-26 10:35:28 -07:00
Charles f7cb609770 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.
2026-06-26 10:34:37 -07:00
Karim Daher db2101c994 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).
2026-06-26 10:33:21 -07:00
Kam 12fcec8ce9 docs(forms): clarify debounce('blur') usage with custom FormValueControl
A custom FormValueControl only participates in debounce('blur') if it emits
the touch output on the native blur event. This was undocumented, and the
touch name reads like a focus event, so users wired it to (focus) and
blur-based debouncing silently did nothing.

Add a dedicated guide section with a working example, link the debounce API
reference to it, and clarify the touch JSDoc that it must fire on blur, not
focus.

Fixes #69370
2026-06-24 11:38:48 -04:00
Modeste ASSIONGBON edea40b5a0 docs: add doc to focusBoundControl feature 2026-06-24 11:26:26 -04:00
cexbrayat a3a9308894 docs: clarify signal forms limit metadata keys
Explain that MIN and MAX are selection keys which point to the type-specific limit metadata keys, such as MIN_NUMBER, MIN_DATE, MAX_NUMBER, and MAX_DATE.

Also list minDate() and maxDate() alongside min() and max() in the Signal Forms metadata docs, so the validator tables match the actual metadata model.
2026-06-24 11:25:56 -04:00
Shuaib Hasan Akib 64bb7adda0 docs: standardize padding and margin for insert-container 2026-06-24 11:25:23 -04:00
Saurabh Singh 7057b1257f docs(core): document resource chaining with chain() in params context
Adds a 'Chaining resources' section to the resource guide covering:
- Basic usage of chain() to depend one resource on another
- Status propagation for all ResourceStatus values (idle, loading,
  reloading, error, resolved, local)
- Chaining vs reading .value() directly, shown as an avoid example
- Guidance on passing the chained value directly as params

Also adds an @see link from ResourceParamsContext to the new section.

Closes #69329
2026-06-24 11:23:49 -04:00
arturovt ea177257e9 docs: add error guide for NG05102
Adds an error reference page for NG05102 (UNSUPPORTED_EVENT_TARGET) explaining
what triggers it and how to fix it. Also marks the error code as negative (-5102)
so that in dev mode the error message automatically links to the new guide page
on angular.dev/errors, consistent with other documented runtime errors.
2026-06-24 10:58:27 -04:00
SkyZeroZx f76e8a98c1 fix(http): prevent caching of responses with Set-Cookie headers
Skip HttpTransferCache serialization for HTTP responses that contain a
Set-Cookie header.

Cookie-setting responses commonly represent session-specific,
user-specific, or security-sensitive state. Serializing their bodies into
SSR TransferState can embed sensitive data into the generated HTML, where
it may be reused during hydration or replayed by a shared cache/CDN.
2026-06-24 10:57:45 -04:00
Angular Robot 295dad7389 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-24 10:48:36 -04:00
Angular Robot 681148c674 build: lock file maintenance
See associated pull request for more information.
2026-06-23 15:00:31 -04:00
yamanerkam af14ce16cf fix(docs-infra): keep footer headings on a single line
The "Community translations" column heading wrapped to two lines while
the other footer headings stayed on one. Add a `white-space: nowrap`
rule on the footer headings, scoped to the wide (4-column) layout. The
breakpoint is driven by a shared `$columns-breakpoint` variable so the
nowrap rule and the grid's 2-column collapse stay in sync.
2026-06-23 14:59:36 -04:00
Alan Agius 06e9da4428 docs: document support for standard forwarded proxy header
Update the security guide to document that the Angular SSR request handling pipeline now supports and validates the standard RFC 7239 `Forwarded` header.

Previously, only non-standard `X-Forwarded-*` headers were supported for resolving proxy-forwarded protocols, hosts, and ports. With this update:
- The standard `Forwarded` header parameters (such as `host` and `proto`) are validated and take precedence over corresponding `X-Forwarded-*` headers when trusted.
- The `trustProxyHeaders` option and `NG_TRUST_PROXY_HEADERS` environment variable can be configured to trust the `Forwarded` header.

For more details on the implementation, see the corresponding PR:
https://github.com/angular/angular-cli/pull/33406
2026-06-23 14:16:51 -04:00
yamanerkam 7421124956 docs: remove space before question mark in landing page heading
The bottom CTA heading on the landing page read "Want to learn more about
Angular ?" with a space before the question mark, while the matching heading
higher up the page correctly had no space. Removed the space so both read
"Want to learn more about Angular?".
2026-06-23 12:56:01 -04:00
arturovt dead64fbdb docs: add error guide for NG05101
Adds a new error reference page for NG05101 (NO_PLUGIN_FOR_EVENT),
which is thrown when no registered EventManagerPlugin supports the
event name passed to addEventListener. The page covers the two common
causes: a typo in the event binding and a missing plugin provider.
2026-06-23 11:25:48 -04:00
SkyZeroZx 7fc46ed3a1 docs: Add docs for markAsTouched with skipDescendants 2026-06-23 11:22:05 -04:00
yamanerkam a4e9ff1e0c docs: add missing space before decorator link in components guide
The `@Component` inline-code span was directly adjacent to the
`[decorator](...)` link, rendering as a mashed-together token in the
source. Added a space so it reads "A `@Component` [decorator] that..."
as intended.
2026-06-23 09:48:16 -04:00
aparziale 69ac1d5ee8 docs: show selected menu item visually in context menu example
Replace console.log with a lastAction signal and render the result in a styled <p> element with a fade-in animation.
2026-06-22 16:46:53 -04:00
Kam 642165f6fc fix(docs-infra): remove white flash on example viewer tab labels
The code tabs rendered by the example viewer (e.g. the npm/pnpm/yarn/bun
install tabs) paint their active label as transparent text clipped to a
gradient. Material's MDC tab styles add `transition: color 0.15s linear`
to `.mdc-tab__text-label`, plus a 100ms delay on the active tab. Because
that transition animates `color` from the solid label color to
transparent, the solid color stays visible on top of the gradient for
~100ms when a tab is activated, which reads as a white flash.

Disable the transition on these labels so the color switches instantly,
and target `.mdc-tab__text-label` directly (instead of a generic `span`)
so `color: transparent` drives the gradient clip cleanly.
2026-06-22 16:27:57 -04:00
Kam 50bb0d6bfe fix(docs-infra): prevent inline code in table headers from wrapping mid-word
When a documentation table has a wide content column, the narrow header
columns get squeezed and inline-code header labels break mid-word at
their hyphens. On the MCP server tools page this rendered the `local-only`
and `read-only` column headers as `local-` / `only` and `read-` / `only`.

Apply `white-space: nowrap` to `code` inside `th` so header tokens stay on
a single line. The rule is scoped to headers, whose labels are always
short, so long code signatures in body cells continue to wrap and no
table gains a horizontal scrollbar.
2026-06-22 16:05:44 -04:00
Kam 350763d84a fix(docs-infra): restore adev build under stricter ts_project deps
The cross-repo dependency update in #69410 bumped rules_angular, whose
ts_project now requires every entry in `deps` to provide the JsInfo
provider. Two adev targets passed deps that don't, so `bazel build
//adev:build` fails analysis and the adev CI check has been red on main
since that PR.

Make generate_nav_items return JsInfo (with the generated routes.json as
its sources) so navigation-entries can keep importing routes.json through
its deps. Also drop the spurious deps entry on llms_lib: llms.mts reads
llms-list.md at runtime via readFile rather than importing it, and the
file is already provided to the binary via data.

Fixes #69429
2026-06-19 11:37:17 +02:00
rudzikdawid 69a00043a4 docs(docs-infra): add missing readonly property to combobox guide
PR angular/components#33364 restored the `readonly` property for the
combobox, but the documentation was not updated to reflect this change.
This commit adds the missing `readonly` input and its description to
the Inputs / Model table in the combobox guide.
2026-06-18 14:18:36 -04:00
yamanerkam e77a8a0c7a fix(docs-infra): align the page title with its edit action
The page title row (`.docs-page-title`) relied on the default flex
alignment, so the edit icon next to the title did not line up with the
title text. Add `align-items: baseline` so the icon sits on the title's
baseline.
2026-06-18 14:06:22 -04:00
Angular Robot 1566442a0d build: update cross-repo angular dependencies
See associated pull request for more information.
2026-06-18 12:26:16 -04:00
yamanerkam ffcc8eee98 fix(docs-infra): correct select dropdown scrolling, sizing, and selection
Several issues in the shared docs `Select` component (used by the API
reference package filter):

- The options list never scrolled: its element used a class with no styles,
  so the intended max-height/overflow rule was dead. Point it at the styled
  class so long lists scroll within the popover.
- Selecting an option now closes the popup instead of leaving it open.
- Clip the trigger and popover corners (overflow: hidden) so their rounded
  borders render cleanly, and align the popover width with the trigger.
- Drop the selected-option checkmark. The component is single-select and
  already marks the selection with a highlight, so the tick was misleading.
- Remove the unused `disabled` input.
2026-06-18 10:52:35 -04:00
yamanerkam e7a4e25318 docs: use the @Service decorator in the first-app and signals tutorials
Update the services in the first-app and signals tutorials to use the
`@Service()` decorator instead of `@Injectable({providedIn: 'root'})`.
This affects `HousingService` (first-app steps 10-14) and `CartStore`
(signals step 7).
2026-06-18 10:48:02 -04:00
Matthieu Riegler c23ddd6a99 docs(docs-infra): remove deprecated ts flags
This fixes the playground & tutorials
2026-06-18 15:29:39 +02:00
Angular Robot 2d2d5fc362 build: lock file maintenance
See associated pull request for more information.

Closes #69367 as a pr takeover
2026-06-17 09:12:30 -07:00
rudzikdawid 02d6b436f1 fix(docs-infra): increase SSR fetch limit to prevent 404 on page reload
Navigating to specific ARIA guide pages directly or via hard refresh
causes a 404 error because the payload exceeds the default SSR fetch
limit. This commit increases the maxResponseBodySize to 2MB.
2026-06-17 08:03:54 -07:00
SkyZeroZx 0152e3cbdf fix(core): treat iframe credentialless as security-sensitive
Mark the iframe `credentialless` attribute as security-sensitive so dynamic
bindings are handled consistently with other iframe attributes that affect the
initial navigation, such as `sandbox`, `allow`, `referrerPolicy`, `csp`, and
`fetchPriority`.

Because `credentialless` must be present before the iframe starts loading to
affect the navigation’s credential mode, late dynamic updates can leave the final
DOM looking correct while the initial request was not loaded credentiallessly.
2026-06-16 09:05:53 -07:00
yamanerkam cbccd368af docs: use the @Service decorator in the learn-angular DI tutorial
The "Creating an injectable service" tutorial introduced services with
`@Injectable({providedIn: 'root'})`, even though the essentials guide and
the in-depth dependency injection guides have already moved to the newer
`@Service` decorator. This left the tutorial out of step with the rest of
the documentation.

Update steps 19 and 20 to use `@Service()`. Because `@Service()` is an
ergonomic shorthand for `@Injectable({providedIn: 'root'})`, the examples
behave identically while teaching the recommended modern API. The step 19
README is reworked to match: it drops the now-unnecessary `providedIn`
configuration step and adds a note linking to the in-depth services guide
for the `autoProvided: false` opt-out.
2026-06-16 08:49:04 -07:00
Angular Robot 01e99d8a32 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-06-15 11:18:08 -07:00
Kam 4ba8ba4ef2 fix(docs-infra): align homepage banner and search field
The homepage hero lays out the announcement banner and the search field on
the same flex row. The `.search-field` wrapper was a plain block, so its
`docs-text-field` kept its intrinsic height instead of filling the row,
leaving the two pills at different heights and vertically misaligned.

Make `.search-field` a flex container so the search control stretches to the
row height and matches the banner.
2026-06-15 09:15:29 -07:00