Commit Graph

2968 Commits

Author SHA1 Message Date
Angular Robot 2e6a05750e docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-08-26 15:50:33 -07:00
Angular Robot 8c26fc74e5 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-08-26 15:37:41 -07:00
Kam ddfd8a8e9b refactor(docs-infra): remove example configs for tooling that no longer exists
An example-config.json marked a directory as a doc example and told aio's
example tooling which boilerplate to use and what to run against it. #56496
removed that tooling in June 2024. Eight of these fifteen files are empty and no
code has read any of them since; the name survives only in the zip and
StackBlitz exclude lists, which skip it rather than open it.
2026-08-25 15:21:49 -07:00
Lazizbek Ergashev 3848b7f8bc docs: clarify onSameUrlNavigation reload behavior
fixes #70367
2026-08-25 11:27:10 -07:00
Kam 90fc9475f2 refactor(docs-infra): remove example code that nothing references
The `built-in-directives` and `structural-directives` example apps are no
longer referenced. Two guide rewrites moved their pages to inline code fences
and dropped the last references without removing the apps: #69134 for
structural directives, and #69822 for built-in directives, whose page is gone
entirely. Both apps sat inside the `embeddable` glob, so they were still
compiled as preview components on every build.

The example e2e suites are excluded from every consumer by design: previews
ignore `*.e2e-spec.ts` and `*.po.ts`, and the zip and StackBlitz pipelines
both list the suffix in `EXCLUDE_FILES`. They could not run in any case,
since every spec declares a `driver` and never assigns it before calling
`driver.get('')`, left over from an abandoned protractor to selenium
migration.

The eslint configuration in the same directory is also unused. Nothing in the
repository depends on eslint, and `tsconfig.eslint.json` extends a path that
no longer exists.
2026-08-25 10:11:19 -07:00
Kam 7da60d1920 fix(docs-infra): redirect three removed pages instead of 404ing
`guide/http/security` and `reference/concepts` both still exist as content but
neither is routed, so each falls through to the 404 shell.

`guide/http/security` was navigable from November 2023 until #54365 removed its
entry in February 2024. #55029 then copied its XSRF sections into the security
guide, which already covered XSSI, and #55060 repointed the remaining links, so
it now redirects to `/best-practices/security`.

`reference/concepts` was added by #54365 and removed by #58694 in November
2024, leaving it navigable for nine months without a redirect. The same commit
also removed `guide/ngmodules`, the route its only card linked to, so both now
redirect to `/guide/ngmodules/overview`, alongside the four `guide/ngmodules/*`
paths already redirected there.

Both pages are removed, along with the Bazel package that existed only to build
the concepts page, and the stale `llms-list.md` entry for the HttpClient page.
The security guide takes its place in that list, so `llms-full.txt` keeps its
XSSI coverage and picks up CSP, Trusted Types and sanitization with it.
2026-08-25 10:08:42 -07:00
Kam a67d4027e2 refactor(docs-infra): remove the Windows tile icons and other unused icons
The `msapplication` tile configuration serves no purpose now, so the
`browserconfig.xml` it points at, the five tile images and the two meta tags
in `index.html` are removed together.

`shared-docs/icons/twitter.svg` is also unused, left behind when the footer
moved to X and Bluesky. Its three siblings in that directory are all still
referenced.
2026-08-25 10:02:43 -07:00
Angular Robot 1426f5ecf5 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-08-24 15:53:22 -07:00
Angular Robot 671d8d395e build: update all non-major dependencies
See associated pull request for more information.
2026-08-24 10:49:59 -07:00
Kam 5e8a70a010 fix(docs-infra): fail the build on duplicate heading anchors
Two headings on the same page can generate the same anchor id, and every
link to it then resolves to whichever comes first. Nothing caught this
because the route manifest keeps anchors in a `Set`, so a repeat collapses
into one entry before any check runs, and the existing link validation only
asks whether an anchor exists, which a duplicate satisfies.

The generator now inspects each page's headings while they are still an
ordered list and fails with the offending pages and anchors. The scanning
and the duplicate check move to `heading.mts` so they are covered by tests
next to `getIdFromHeading`, which should keep this from coming back.
2026-08-24 10:36:16 -07:00
Kam 698a14d735 fix(docs-infra): give duplicated headings their own anchor ids
Eight guides have headings that generate the same anchor id twice or more.
Because an id resolves to the first element that claims it, the table of
contents lists two entries pointing at the same place, the second section
cannot be reached from the ToC at all, and the copy link button on the
later heading hands out a URL for the earlier one.

On `guide/forms/reactive-forms` the two "Display the component" steps sit
5176px apart and both ToC entries scroll to the first.

Give the later heading on each page an explicit id with the `{#custom-id}`
syntax the pipeline already supports. Only later duplicates are changed, so
every anchor that resolves today keeps pointing at the same heading.
2026-08-24 10:36:16 -07:00
Kam 355a9d83e3 refactor(docs-infra): remove images no longer referenced by any doc
Most of these came over from the angular.io docs and were orphaned as adev
rewrote or dropped the guides that used them. Two are newer: a devtools
screenshot that was added but never referenced, and the logo left behind
when the Firebase Studio launcher was removed. All of them are still
copied into the build and served from angular.dev.

No markdown, template, stylesheet, TypeScript file or build target
references any of them, by filename or through a path built at runtime,
and the images are globbed into the build rather than listed, so nothing
else needs updating. Removes 78 files, 5.15 MB in total, and empties
nineteen directories.
2026-08-24 10:35:41 -07:00
Kam 3074fdb3ab docs: repair the AST link in the AOT compiler guide
The link to the Wikipedia article on abstract syntax trees spelled the
underscores as asterisks, which 404s. The same link two paragraphs
earlier in this guide is correct.
2026-08-24 10:31:51 -07:00
Kam 39da06138b fix(docs-infra): repair redirects pointing at removed pages
Five redirects sent people to the home page instead of a guide, because
their target no longer exists: the four `guide/ngmodules/*` entries point
at `/guide/ngmodules`, which has no route, and
`guide/animations/transitions-and-triggers` had a plural in a target that
is registered as `transition-and-triggers`.

Two more resolved only after a second hop, redirecting to a path that is
itself a redirect.

The spec only checked that a `redirectTo` starts with a slash, which all
seven satisfied, so it now also checks that the target is a real page and
that it is not another redirect.
2026-08-24 10:31:14 -07:00
Kam c6a6ad0a44 refactor(docs-infra): drop exclude patterns for examples that no longer exist
The `embeddable` glob excludes nine example directories. Four of them,
`testing`, `ssr`, `resolution-modifiers` and `dependency-injection`, were
removed by #66753 and #61686 without updating this file, so those patterns
match nothing.

Three of the four sit under a TODO about examples that do not compile. Those
were deleted rather than fixed, which leaves `reactive-forms` and
`form-validation` as the only two the note still applies to.
2026-08-24 10:16:18 -07:00
Kam 51cb07e980 docs: point the LLM indexes at current pages, not redirects
`llms-list.md` feeds the generated `llms-full.txt`. Three of its DI
entries were left behind by a page rename: two named files that no longer
exist and one named a copy that had been superseded. The generator warns
on an unreadable file and carries on, so the build stayed green while
`llms-full.txt` quietly lost three DI guides and shipped a stale fourth.

`llms.txt` linked the same old URLs, which only reach their pages through
a redirect, plus `guide/hybrid-rendering`, which redirects to `/guide/ssr`
and duplicates the line above it.

Also removes `creating-injectable-service.md`, left behind by that rename
and reachable from nothing.
2026-08-21 12:36:50 -07:00
Kam eb6570b06d refactor(docs-infra): remove the orphaned home animation component
The new home page in #63662 stopped rendering `HomeAnimationComponent`
and its directory was left behind. The animation that runs today lives
in `features/home/animation`, which replaced it.

Nothing references the class, its `adev-home-animation` selector, or any
file in the directory, and no stylesheet or build target pulls it in.
2026-08-21 12:35:12 -07:00
Kam 4997521685 refactor(docs-infra): type the API manifest in the nav entries
`getApiNavigationItems` cast the manifest to `any` behind a TODO waiting
on #66252, which was closed without merging, so the three `any`s it
guarded were never going away on their own.

The real `ApiManifestPackage` cannot be imported here: navigation
entries are built as a standalone `ts_project` so the route generator
can consume them at build time, and it has no dependency on the app
tree. Declaring the handful of fields this file reads gets rid of the
`any`s without touching the build graph.
2026-08-21 12:29:38 -07:00
Kam 238d8bf98a refactor(docs-infra): hold editor diagnostics in a signal
`DiagnosticsState` carried a TODO to move off `BehaviorSubject` once
zoneless was turned on. adev has been zoneless for a while now, with no
zone.js dependency and an empty `polyfills` array, so the condition is
met and the TODO can go.

Both consumers now derive from the signal instead of subscribing. The
Console tab badge becomes a `computed`, and so does the code editor's
error list: the diagnostics are produced by a `linter()` configured with
a 400ms delay rather than arriving as a stream, so the rxjs chain was
only adding a further second before they were displayed. The errors box
stays dismissable through a `linkedSignal`, which reverts as soon as the
diagnostics change.
2026-08-21 11:50:42 -07:00
Kam 593f2d7e2e refactor(docs-infra): share the angular.dev origin constant
The angular.dev origin was declared twice as a local `ANGULAR_DEV`
const and hardcoded inline in two more places. It now lives once in
`core/constants/links.ts`, next to `ANGULAR_LINKS`.
2026-08-21 11:50:02 -07:00
Angular Robot 1fb3b58abe build: update cross-repo angular dependencies to v22.2.0-next.2
See associated pull request for more information.
2026-08-19 12:38:52 -07:00
Kam f35a3961c4 fix(docs-infra): remove stray tokens from adev illustrations
`routing.svg` and `directives.svg` each carry leftover text after a
`stroke-miterlimit` attribute, which has made them invalid XML since the
angular.dev import. They render only because decorative headers inline
them into the page, where the HTML parser turns the leftovers into empty
attributes, but the files fail anywhere they are parsed as XML,
including when served directly as `image/svg+xml`.

Neither drops anything from the drawing. The `directives.svg` leftover
repeats a path the file already declares.
2026-08-19 08:26:30 -07:00
Sam Severance bb1274d6ac fix(docs-infra): refactor unit test
Replace two toContain assertions with a single toMatch
using a multiline regex, per reviewer suggestion.
2026-08-18 15:45:30 -07:00
Sam Severance 7febf40e0d fix(docs-infra): fix code block deindentation in docs-code and docs-code-block
Consolidates deindentation logic into formatCode so both docs-code and
docs-code-block are covered by a single fix. The original deindent
function incorrectly iterated over blank lines instead of non-blank
lines when computing minimum indentation, causing code blocks to render
with excessive leading whitespace. Also fixes region extraction which
had the same trim-before-deindent ordering issue.
2026-08-18 15:45:30 -07:00
Angular Robot 48831fc5fe build: lock file maintenance
See associated pull request for more information.
2026-08-18 08:54:49 -07:00
Nikita Barsukov 182c371d82 docs: use transformedValue in Forms | Custom Controls | Value transformation section
The "Value transformation" section taught readers to hand-roll
transformation with `linkedSignal()` and a manual parse method, even
though `@angular/forms/signals` ships `transformedValue()` for exactly
this case. Readers ended up with a weaker version of a feature the
framework already provides — notably, no parse error reporting.

Rewrite the section around `transformedValue()` and document the parts
the manual pattern could not cover: returning `{error}` from `parse` to
surface parse errors on the field's `errors()`, and `reset()` clearing
them. This also makes good on the cross-reference from the validation
guide, which pointed here for parse error details the section never
covered.

Fixes #70206

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2026-08-17 14:58:14 -07:00
splincode d35c17d393 refactor: correct typos in comments, docs, and error messages
Fix misspellings found across multiple packages:

- `paramters` → `parameters` (utils.spec.ts)
- `directve` → `directive` (typecheck/context.ts)
- `subscriper` → `subscriber` (zone.js rxjs test)
- `swich` → `switch` (adev animation parser test)
- `subscribtion` → `subscription` (forms/abstract_model.ts)
- `lifecyle` → `lifecycle` (ng-devtools-backend hooks)
- `compatability` → `compatibility` (tree-visualizer.ts)
- `indentifier(s)` → `identifier(s)` (compiler-cli shared.ts, i18n_helpers.ts, declaration_only_emission_spec.ts)
- `identifer` → `identifier` (platform-browser shared_styles_host.ts)
- `prcess` → `process` (standalone-migration to-standalone.ts)
2026-08-17 14:57:04 -07:00
arturovt 38d093232c fix(forms): warn in dev mode when ngModel cannot reach parent NgForm across component boundary
NgModel injects ControlContainer with @Host(), which stops the injector at
the component host element boundary. When NgForm lives in a parent component
and ngModel lives in a child component, the injection returns null silently
and the control acts standalone — never registering with the form.

To surface this invisible failure, emit a dev-mode warning (NG01354) when
ngModel's @Host() injection finds nothing but the element Injector can still
reach a ControlContainer further up the hierarchy. The warning identifies the
cross-boundary issue and points developers to the viewProviders fix or the
standalone option.

Adds the NG01354 reference page explaining why the warning fires and providing
two remediation paths: bridging ControlContainer via viewProviders, or opting
out with [ngModelOptions]="{standalone: true}".

Fixes #47580
2026-08-17 13:59:40 -07:00
Kam 064530447e feat(docs-infra): add Angie to the routing illustration
The routing header draws a serpentine route with map pins on it but
nobody travelling it. Angie now stands on the top segment, the same way
she stands on the road in the roadmap header.

She needs more headroom than the canvas had, so the viewBox gains 12
units at the top and the illustration carries its own max-height, which
keeps the rest of the drawing at the size it rendered before.
2026-08-17 13:46:46 -07:00
Evgenii Fomin 8d6c6a9a0c docs: make a note regarding i18n messageIdFormat 2026-08-17 13:44:22 -07:00
Kam 1c2b0575ed feat(docs-infra): add Angie to the roadmap illustration
The roadmap header draws a road between a start pin and a destination
pin, but nothing travels it. Angie already appears on the 404 page, the
embedded editor states and the error snack bar, so put her on the road
too.

Decorative headers are inlined into the page so the road can use CSS
variables for dark mode, which means the pose has to be embedded as
paths, with its classes flattened and its ids prefixed to keep them out
of document scope.

Note this asset is also the essentials Next Steps header.
2026-08-17 13:33:29 -07:00
Angular Robot 544d084c34 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-08-17 13:24:20 -07:00
Angular Robot 5980138246 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-08-17 11:27:16 -07:00
arturovt 1cb3d606bf fix(platform-browser): throw a descriptive error when insertBefore reference node is missing
Angular's internal LView/TNode bookkeeping can get out of sync with the
real DOM: manual DOM manipulation, a browser extension, or an edge case in
Angular's own view-insertion/reordering code can all leave Angular believing
a node is still attached at a given position when it isn't. The next time
Angular's renderer calls `insertBefore` relative to that stale reference
node, the native DOM API throws an opaque `NotFoundError` with no indication
of which node or component was involved, making these errors effectively
undebuggable in production:

    NotFoundError: Failed to execute 'insertBefore' on 'Node': The node
    before which the new node is to be inserted is not a child of this node.
        at Node.insertBefore (native)
        at DefaultDomRenderer2.insertBefore (packages/platform-browser/src/dom/dom_renderer.ts)
        at nativeInsertBefore (packages/core/src/render3/dom_node_manipulation.ts)
        at nativeAppendOrInsertBefore (packages/core/src/render3/dom_node_manipulation.ts)
        ... (called while Angular inserts or moves a view during change detection)

Check the reference node's actual parent against the expected parent before
calling the native `insertBefore`, and throw a descriptive `RuntimeError`
(NG05106) instead, following the same pattern already used for hydration
node mismatches.
2026-08-14 08:29:59 -07:00
Kristiyan Kostadinov 7b74bee5b4 build: switch adev tests away from protractor
Reworks the tests in adev not to depend on Protractor.
2026-08-14 08:22:34 -07:00
Angular Robot d3d3bc62ea build: update cross-repo angular dependencies
See associated pull request for more information.
2026-08-13 13:35:29 -07:00
Aristeidis Bampakos 144b90c907 docs: add code style in Antigravity file reference 2026-08-13 13:33:41 -07:00
Angular Robot 16e42c39c1 build: update all non-major dependencies
See associated pull request for more information.
2026-08-13 09:05:24 -07:00
Bhuvansh855 647bf8e143 docs: note SafeResourceUrl audio src change 2026-08-13 08:55:03 -07:00
Angular Robot b7ed8d81ac build: lock file maintenance
See associated pull request for more information.
2026-08-13 08:28:25 -07:00
Angular Robot bf1f63476d build: update cross-repo angular dependencies to v22.2.0-next.1
See associated pull request for more information.
2026-08-12 16:13:42 -07:00
Jessica Janiuk 3d32db6a49 docs: clarify animate.leave child animation behavior
This updates the docs to be explicit about `animate.leave` and nested element removal order. It clearly specifies that `animate.leave` will only fire nested animations within the same component template.

closes: #70131
2026-08-12 11:07:14 -07:00
Kam dd29713828 fix(docs-infra): contain scroll within adev dropdown menus
Scrolling to the top or bottom of a dropdown let the scroll event chain into
the page behind it, causing the whole app to scroll. #70137 fixed this for the
version picker, but the same containment was missing on every other menu.

The API reference filter, the tutorial step list and the update guide's version
dropdowns already had a scroll container, so they only needed
overscroll-behavior.

The social and theme mini-menus had neither a height cap nor overflow, so
overscroll-behavior alone would have been inert on them. They now share the
version picker's max-height/overflow-y/overscroll-behavior, hoisted onto
.adev-mini-menu, which also keeps their items reachable when the viewport is
too short to fit the whole menu.
2026-08-11 10:00:53 -07:00
splincode 8e41e97dfe docs: update Angular Aria roadmap status
Update the roadmap to reflect that Angular Aria became stable in Angular v22 while development of new patterns continues.
2026-08-10 15:34:51 -07:00
Angular Robot 4fc6e319bf build: update dependency @types/jsdom to v30
See associated pull request for more information.
2026-08-10 09:43:40 -07:00
Angular Robot 78c0cdd80d docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-08-10 09:42:52 -07:00
yamanerkam 768c8c29dc fix(docs-infra): contain scroll within version picker dropdown
Scrolling to the top or bottom of the version picker's dropdown list
let the scroll event chain into the page behind it, causing the whole
app to scroll. The search dialog and search history dropdowns already
guard against this with overscroll-behavior: contain; apply the same
fix to the version picker.
2026-08-10 09:11:18 -07:00
Angular Robot b95f9e2691 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-08-10 08:57:16 -07:00
Angular Robot 0eaf1c55d3 build: update all non-major dependencies
See associated pull request for more information.
2026-08-07 15:56:00 -07:00
lazerg 96b80424c7 docs: fix supported Node.js version in installation prerequisites 2026-08-04 10:31:03 -07:00