Compare commits

...

1916 Commits

Author SHA1 Message Date
Alon Mishne ef9669c1f8 release: cut the v21.2.11 release 2026-04-29 15:38:40 -07:00
Kam 6c6db5b604 docs(docs-infra): open update guide external links in new tabs
External links in the update guide opened inconsistently. Override
marked's link renderer to add `target="_blank" rel="noopener noreferrer"`
to external anchors and apply the `external-link-with-icon` mixin for
the icon. Convert raw HTML and bare URLs in recommendations.ts to
markdown so they all flow through the renderer.

(cherry picked from commit 13c0422029)
2026-04-29 20:59:46 +00:00
Kam 185862ef76 docs: document allowedHosts SSR requirement in v21 update guide
The GHSA-x288-3778-4hhx patch requires `allowedHosts` on
`CommonEngine` or SSR silently falls back to CSR. Add a checklist
item to the v21 update guide.

(cherry picked from commit 2101b13653)
2026-04-29 20:59:17 +00:00
Bhuvansh855 631e303dd9 docs: improve clarity in dependency injection guide
(cherry picked from commit 9f7d41f296)
2026-04-29 20:38:21 +00:00
Alan Agius 41e4851928 docs: update documentation for platform server URL token options
This `baseUrl` option is not available.

(cherry picked from commit 0f7086add4)
2026-04-29 20:37:04 +00:00
Andrew Scott a24dcfd1ec refactor(compiler-cli): remove reflectionhost from environment
all necessary info is already available in the tcb meta objects. environments without full ts program no longer need a reflectionhost for tcb generation

(cherry picked from commit c70625e806)
2026-04-29 20:36:25 +00:00
Ben Hong 1dde3827e9 docs: add debouncing section to signal forms async operations
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit 18826de489)
2026-04-29 20:35:22 +00:00
Andrew Scott b40b67cdc1 fix(vscode-extension): Look for tsdk override in the new js/ts.tsdk.path setting
recent versions of vscode use js/ts.tsdk.path rather than typescript.tsdk

relates to #68423
2026-04-29 13:32:02 -07:00
Angular Robot 4900e453e1 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-29 13:29:44 -07:00
Matthieu Riegler 42d57c3578 refactor(common): fix viewport tests
10ad3c0 broke the 21.2.x branch
2026-04-28 16:38:11 -07:00
SkyZeroZx 10ad3c0692 fix(common): prevent focus from scrollToAnchor
Focus the target element using `focus({preventScroll: true})` after scrolling, so the browser doesn’t adjust the scroll position when applying focus.

Fixes #65938

(cherry picked from commit 97cac1cf4d)
2026-04-28 19:39:31 +00:00
Denis Balan d07f502946 docs: Fix links to Firebase AI Logic Angular example
(cherry picked from commit 5dfe37df8e)
2026-04-28 19:10:52 +00:00
Suraj Yadav 600da64ba4 docs(forms): add NG01902 error reference and link to docs
Add the NG01902 (Orphan field in signal forms) documentation page
to the Error Encyclopedia and change the ORPHAN_FIELD_PROPERTY
error code to -1902 so Angular's RuntimeError automatically appends
a link to angular.dev/errors/NG01902 in the thrown error message.

(cherry picked from commit f2c6445681)
2026-04-28 19:07:50 +00:00
Matthieu Riegler a40e2cebc8 fix(core): fix ordering of view queries metadata in JIT mode
AOT was generating an array that was ordered as signal queries first, then the decorator queries.
Aligning JIT with AOT fixes the issue illustrated by the test.

fixes #68404

(cherry picked from commit 8c11816490)
2026-04-28 19:03:45 +00:00
Kam 9ed1b6c045 docs: use contentChildren() in component harness example
The example already uses the signal-based input() but still declares
items with the @ContentChildren decorator. Convert to the signal-based
contentChildren() query for consistency.

(cherry picked from commit a6eb55642c)
2026-04-28 19:03:13 +00:00
Angular Robot 2b9b27e882 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-28 12:00:21 -07:00
Angular Robot 85f1c0a268 build: lock file maintenance
See associated pull request for more information.
2026-04-28 11:59:30 -07:00
Kam fb7e67ca9d docs: use inject() in @Self example in hierarchical DI guide
The surrounding @SkipSelf and @Host examples already use inject(),
and the section intro recommends it. Align the @Self example to match.

(cherry picked from commit 273ff07469)
2026-04-28 17:31:02 +00:00
Herdiyan IT Dev 316d49a8ae refactor(dev-infra): use shell: false and quote args in benchmark-compare workflow
Currently, the exec() utility uses childProcess.spawn() with shell: true. This commit changes the spawn option to shell: false to prevent OS command injection vulnerabilities and quotes the benchmark target in the github action.

(cherry picked from commit f219e65841)
2026-04-28 17:29:28 +00:00
Matthieu Riegler 9bcbf37641 refactor(core): fix bundling symbol test
The golden needed an update.
2026-04-28 09:44:58 -07:00
Simon a3d14fc11b docs: remove duplicated text
(cherry picked from commit c8aad6acc6)
2026-04-28 00:10:24 +00:00
Simon 0612c8c53b docs: remove spaces to correct the indentation
(cherry picked from commit 38c352766a)
2026-04-28 00:09:50 +00:00
Kristiyan Kostadinov 4f5d8a2c0b fix(compiler): let declaration span not including end character
Fixes that the span for `@let` declarations didn't include the end token.

(cherry picked from commit 6bd1721662)
2026-04-28 00:09:19 +00:00
Alan Agius be1f80a253 fix(platform-server): ensure origin has a trailing slash when parsing url
The origin did not have a trailing slash, which caused parsing issues for relative URLs.

Fixes #68322

(cherry picked from commit 2a6b6fafb0)
2026-04-28 00:08:40 +00:00
aparziale 76cf531002 docs: Fix typo in doc
Fix typo in documentation. Changed "create workspace" to "create a workspace"

Fixed #68375

(cherry picked from commit 982e3cce52)
2026-04-28 00:08:06 +00:00
Sonu Kapoor 885a1a1d97 fix(core): guard against non-object events and avoid listener wrapper identity mismatch
Two issues caused browser test failures after the event replay fix:

1. `markEventHandledForElement` used the event object as a WeakMap key, but
   `DebugElement.triggerEventHandler` can pass null or primitive values as the
   event argument. Added an early return for non-object values.

2. Registering a separate `domListener` closure with `renderer.listen` instead of
   `wrappedListener` caused `DebugElement.triggerEventHandler` to invoke the
   handler twice: once via `this.listeners` (which holds `wrappedListener`) and
   once via Zone.js's `eventListeners` (which holds the unwrapped `domListener`).
   The existing dedup logic in `triggerEventHandler` checks if the unwrapped
   Zone.js listener is already in `invokedListeners`, but with two different
   function objects that check always fails.

   Replaced the `domListener` wrapper with a property (`__ngNativeEl__`) stored
   directly on `wrappedListener`. `wrapListenerIn_markDirtyAndPreventDefault` reads
   this property and calls `markEventHandledForElement` when the listener fires,
   while `renderer.listen` receives the same `wrappedListener` function that
   Angular stores in `lCleanup`, preserving the dedup invariant.

(cherry picked from commit 3583c01bf9)
2026-04-28 00:07:41 +00:00
Sonu Kapoor 7a64aff9b5 fix(core): prevent event replay double-invocation when element hydrates before app stability
When `withEventReplay()` is enabled and a component hydrates before the
application becomes stable (e.g. while a pending HTTP request is in
flight), a user interaction on the hydrated element triggers both the
real DOM listener registered by Angular and the jsaction replay path.
This causes the event handler to be invoked twice.

The root cause is that `listenToDomEvent` registers the same
`wrappedListener` both as a stashed jsaction handler (via
`stashEventListenerImpl`) and as a native DOM listener (via
`renderer.listen`). When the user interacts after hydration but before
app stability, jsaction queues the event because no dispatcher is
registered yet. Once the app stabilises and `initEventReplay` runs,
jsaction replays the queued event through `invokeListeners`, which
calls the stashed handler a second time.

The fix tracks dispatched `(event, element)` pairs in a
`WeakMap<Event, WeakSet<Element>>`. The native DOM listener wrapper
records each pair via `markEventHandledForElement`, and `invokeListeners`
skips replay for any pair already present. Keying by element (rather
than event alone) preserves incremental hydration behaviour, where
jsaction legitimately replays the same event on a different element
(the deferred block content) from the one that originally triggered
hydration.

Fixes #67328

(cherry picked from commit d5fd51e956)
2026-04-28 00:07:40 +00:00
Kam cbaba8afe6 docs: document moduleResolution bundler change in v20 update guide
The v20 update guide doesn't flag that `ng update` switches
`moduleResolution` to `'bundler'`. Add a checklist item so manual
upgrades don't miss it.

(cherry picked from commit 67a5f00cd8)
2026-04-28 00:06:39 +00:00
Andrew Scott fbe080f829 docs(router): Fix method name for retrieving stored handles
method name was documented incorrectly. this fixes the name

(cherry picked from commit f17f32c351)
2026-04-28 00:03:25 +00:00
aparziale 1be52ad880 docs: Align Router API docs with inject based DI
Updates Router documentation examples to reflect modern inject based dependency injection instead of constructor injection.

Fixed #68378

(cherry picked from commit ded5a0ed62)
2026-04-28 00:02:32 +00:00
SkyZeroZx fa4eff36cb docs(docs-infra): Validate case-sensitive API symbol links in @link
Adds build-time validation for case-sensitive API symbols in `@link`. Avoid broken links

(cherry picked from commit d2c7b4e111)
2026-04-28 00:01:44 +00:00
Andrew Scott 27da56ee9d refactor: use stronger language for adev writing guide
use stronger language to improve skill usage hits for adev writing.

(cherry picked from commit 357cb15208)
2026-04-27 22:29:08 +00:00
Angular Robot 7b8faccc34 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-27 15:27:28 -07:00
Kam 6662724c99 docs(docs-infra): improve Playground card on installation page
Updates the Playground card copy and adds a `titleInline` attribute on
<docs-card> so the icon and title sit on the same row. Existing cards
are unaffected.

(cherry picked from commit 29081f7765)
2026-04-24 17:34:42 +00:00
Angular Robot 8ce8b9342a build: update pnpm to v10.33.2
See associated pull request for more information.
2026-04-24 10:11:20 -07:00
Angular Robot 131c422da2 build: update devinfra digest to c4d0c37
See associated pull request for more information.
2026-04-24 10:06:35 -07:00
Alan Agius fa33854d24 docs: document trustProxyHeaders and update X-Forwarded-Prefix validation
Update the security guide to explain how to configure `trustProxyHeaders` when initializing the application engine. Also, update the validation rules for `X-Forwarded-Prefix` to reflect that it must start with `/` and contain only alphanumeric characters, hyphens, and underscores.

(cherry picked from commit 0399115a82)
2026-04-24 17:04:00 +00:00
Angular Robot f3308dc1f7 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-23 14:14:19 -07:00
Angular Robot f9b70a0887 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-04-23 12:41:14 -07:00
Kam a8dd801856 docs: link Angular CLI in installation prerequisites
Links the "Angular CLI" mention in the Terminal prerequisite to the CLI
overview page.

(cherry picked from commit 6120d3196a)
2026-04-23 18:39:42 +00:00
Angular Robot 2ec753cb77 build: update devinfra digest to e9c1452
See associated pull request for more information.
2026-04-23 11:13:23 -07:00
Leon Senft 90cc755a56 release: cut the v21.2.10 release 2026-04-22 16:28:45 -07:00
Savio Dsouza 4fd1a08699 build: pin firebase-tools version and disable credential persistence in preview deploy workflow
(cherry picked from commit 8f5e0e09e9)
2026-04-22 14:38:27 -07:00
Angular Robot 750af5b123 build: update cross-repo angular dependencies to v21.2.8
See associated pull request for more information.
2026-04-22 11:03:02 -07:00
Rishabhdeep Singh 5533ab4f56 fix(migrations): fix NgClass leaving trailing comma after removal
This fixes an issue where when removing NgClass from the imports array of a component, an extra trailing comma would be left behind if it was the last element in that component`.

(cherry picked from commit b395173cf2)
2026-04-22 09:59:54 -07:00
Rishabhdeep Singh 2b9954fd3d fix(migrations): fix NgClass leaving trailing comma after removal
This fixes an issue where when removing NgClass from the imports array of a component, an extra trailing comma would be left behind if it was the last element in that component`.

(cherry picked from commit 27f021248d)
2026-04-22 09:59:54 -07:00
Angular Robot 4dc7bf5a75 build: lock file maintenance
See associated pull request for more information.
2026-04-21 10:23:48 -07:00
Joel Kesler 0d5ee9ae1b fix(docs): link formatting in "Animating your Application with CSS"
One of the links in `Animating your Application with CSS` page has a formatting bug for one of it's links.

(cherry picked from commit b24b4cb699)
2026-04-21 10:20:11 -07:00
Nikhil Bachani 6a02320575 docs: fix tracking expression reference in NG0955.md
Corrected the tracking expression reference from 'item.key' to 'item.value' in the explanation of duplicate keys.

(cherry picked from commit ac92a8aae8)
2026-04-21 10:14:53 -07:00
Angular Robot 751e4af80b build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-21 09:04:23 -07:00
Matthieu Riegler da346bf696 docs: update builder docs
We use `@angular/build` today.

(cherry picked from commit fa6a3d208d)
2026-04-21 09:02:37 -07:00
SkyZeroZx 580212c995 fix(router): restore internal URL on popstate when browserUrl is used
Fixed an issue where back/forward (`popstate`) navigation attempted to match the displayed `browserUrl` instead of the internal route, which could result in `NG04002: Cannot match any routes`.

Fixes #67549

(cherry picked from commit 6eff439546)
2026-04-20 16:46:30 -07:00
Kam a9ddc5d40a docs: warn against storing secrets in environment files
Add a CRITICAL callout warning that files in `src/environments/`
ship to the client and should not hold secrets like API keys.

(cherry picked from commit d27e2c24e1)
2026-04-20 13:29:18 -07:00
Kam 0d08d9cc82 docs(docs-infra): guard sandbox reset before initialization in playground
changeTemplate() was calling reset() on the sandbox before init()
completed, causing a TypeError when spawning processes on an
uninitialized WebContainer. Add isSandboxReady signal to skip
reset until the sandbox is fully initialized.

(cherry picked from commit c04c0b977a)
2026-04-20 13:17:22 -07:00
Kam 4c7ec66807 docs(docs-infra): adjust close button spacing in mobile navigation
Use relative positioning to offset the close button from the top edge without affecting the layout of surrounding elements.

(cherry picked from commit 2dc3ab596b)
2026-04-20 13:14:40 -07:00
Matthieu Riegler 62266eee8b ci: remove disabled side-effects integration tests
This test was disabled 5+ years ago, we probably don't need it anymore.

(cherry picked from commit 13be2961f6)
2026-04-20 13:13:28 -07:00
Bhuvansh855 2a50dceef5 docs: improve wording and consistency in forms documentation
(cherry picked from commit 74a7d6b8f9)
2026-04-20 13:12:35 -07:00
Andrew Scott c9215b3539 Revert "refactor(core): complete removal of deprecated createNgModuleRef alias"
This reverts commit d88d6ed69e.
Depended on a PR that was not merged to 21.2.x
2026-04-20 12:55:55 -07:00
SkyZeroZx d88d6ed69e refactor(core): complete removal of deprecated createNgModuleRef alias
Finalize the cleanup by removing the remaining `createNgModuleRef` alias.

(cherry picked from commit 3ae40e6685)
2026-04-20 12:09:51 -07:00
Bhuvansh855 e5b93ea4ca docs: fix wording in reactive forms guide
(cherry picked from commit c610425310)
2026-04-20 09:51:47 -07:00
Joey Perrott ce883d95ef build: update peer dependencies and bump version
Update peer dependencies to support Angular 21 instead of 22-next and bump the patch version to 0.21.1.
2026-04-20 09:39:10 -07:00
Bhuvansh855 be7490964a docs: improve clarity in dynamic forms guide
(cherry picked from commit a718e188c6)
2026-04-20 09:30:50 -07:00
Angular Robot 810fb7382f build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-17 14:34:29 -07:00
aparziale b24ead5571 refactor: Improve hydration mismatch errors for third-party scripts
Improves error messages shown during hydration mismatches to better
surface cases where third-party scripts or browser extensions have
modified the DOM outside of Angular's control.

Fixed #59224

(cherry picked from commit d771a65ac0)
2026-04-17 14:33:15 -07:00
pravintargaryen 6d10b8bb95 docs: add inject to structural directive imports
(cherry picked from commit da6c92eccd)
2026-04-17 14:25:09 -07:00
Angular Robot c738d45fa5 build: update all github actions
See associated pull request for more information.
2026-04-17 10:53:19 -07:00
Angular Robot b2fe2c2474 build: update bazel dependencies
See associated pull request for more information.
2026-04-17 10:51:47 -07:00
Michael Small 9577b49666 docs: capitalize FormField in form-logic.md imports: [...]
(cherry picked from commit 0850e20a83)
2026-04-17 10:50:57 -07:00
Michael Small 50f88e1887 docs: fix rxResource example of validateAsync
(cherry picked from commit 4da3f6c432)
2026-04-17 10:49:56 -07:00
Christian Oliff a57a6496fa docs: Fix typo in menubar.md
manubar > menubar

(cherry picked from commit bf4faed626)
2026-04-17 10:49:20 -07:00
Kam 8d22beb22c docs: fix typo in what-is-angular page
Change "language services powers" to "language service powers".

(cherry picked from commit 9c30e74349)
2026-04-17 10:48:35 -07:00
kirjs e14d5eadd5 release: cut the v21.2.9 release 2026-04-16 00:34:03 +03:00
arturovt 528a93a5da docs(router): document .. traversal and relativeTo pitfalls in router.navigate()
Explain two non-obvious behaviors of the commands array in router.navigate():

- Multiple '..' segments must be combined in the first array element
  (e.g. ['../../foo']), not spread across separate elements
  (e.g. ['..', '..', 'foo']), because the router only parses '..'
  from the first command string. Subsequent elements are treated as
  literal path segments, causing a navigation error.
- A leading '/' in the first command makes navigation absolute and
  silently ignores the relativeTo option entirely.

Closes #65657

(cherry picked from commit 79c981840f)
2026-04-15 15:40:47 -04:00
Ben Hong 32a830231e docs: add new signal forms - form submission guide
(cherry picked from commit 50a3b0e1ba)
2026-04-15 12:38:40 -04:00
Angular Robot 0d1a5b80c2 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-15 19:37:18 +03:00
Matthieu Riegler 17cae6ae5f docs: fix bootstraping link
fixes #68212

(cherry picked from commit a46c64758e)
2026-04-15 12:25:40 -04:00
Suleiman Yunus 4f65bb34b2 docs: correct "What to learn more about Angular?" to "Want to learn more about Angular?"
(cherry picked from commit e32159b5c5)
2026-04-15 10:33:30 -04:00
arturovt eddca4280b fix(zone.js): allow draining microtasks in Promise.then (through flag)
These changes are essentially the same as those introduced in
angular#45273, but they include backward compatibility
for applications that explicitly rely on the order in which microtasks are drained.

This is critically important for our code and other third-party code, which is
beyond our control, to work properly. If a microtask is scheduled within an event
listener to be executed "later", it should indeed be executed later and not synchronously,
as this would break the expected flow of code execution.

The simple code that reproduces the behavior that exists now:

```ts
Zone.current.fork({name: 'child'}).run(() => {
  const div = document.createElement('div');
  div.style.height = '200px';
  div.style.width = '200px';
  div.style.backgroundColor = 'red';
  document.body.appendChild(div);

  function listener() {
    Promise.resolve().then(() => {
      div.style.height = '400px';
    });
  }

  div.addEventListener('fakeEvent', listener);
  div.dispatchEvent(new Event('fakeEvent'));
  console.log(div.getBoundingClientRect().height); // 400
});
```

The code above logs 400 as the height, but it should actually log 200 because the
height is updated in a microtask within the event listener.

When using Angular with microfrontend applications, especially when other apps might be
using React, zone.js can disrupt the classical order of operations. For example, when using a
`react-component/trigger`, it schedules a microtask within an event listener using
`Promise.resolve().then(...)` to determine whether the event needs to be re-dispatched.
The event is re-dispatched when the layout has changed, which is why a microtask is used.

With this change, we introduce a global configuration flag,
`__zone_symbol__enable_native_microtask_draining`, to allow consumers to enable
microtask draining within a browser microtask.

This flag is necessary to prevent any breaking changes resulting from this modification.
The previous attempt to address this issue caused a significant number of failures in g3.
Therefore, we are hiding that fix behind the configuration flag.

Closes angular#44446
Closes angular#55590
Closes angular#51328

(cherry picked from commit fc6a7eea68)
2026-04-15 10:31:33 -04:00
Kam 175343dfdb docs(docs-infra): add background to playground template dropdown
The template dropdown menu had no background color on the container,
causing page content to bleed through behind menu items.

(cherry picked from commit b2cff7918d)
2026-04-15 10:26:10 -04:00
Alan Agius e0b5078cf2 fix(platform-server): prevent SSRF bypasses via protocol-relative and backslash URLs
The `parseUrl` function in `ServerPlatformLocation` uses `new URL(urlStr, origin)` to parse incoming request URLs during SSR. Per the WHATWG URL specification, protocol-relative URLs (`//evil.com`) and backslash-prefixed URLs (`/\evil.com`) can override the hostname component of the base URL.

This vulnerability typically manifests in SSR setups (e.g., Express) where `req.url` is passed directly to `renderApplication` or `renderModule`:

```typescript
// Example usage in an Express server handling: http://localhost:4000//evil.com
app.get('*', async (req, res) => {
  const html = await renderApplication(bootstrap, {
    document: template,
    url: req.url, // req.url is "//evil.com"
  });
  res.send(html);
});
```

(cherry picked from commit ede7c58a2a)
2026-04-15 10:23:57 -04:00
Ben Hong 1e474f7cfa docs: add new signal forms schema guide
(cherry picked from commit 3eba900d3f)
2026-04-15 10:22:40 -04:00
Matthieu Riegler 63a857b874 fix(http): Don't on Passthru outside of reactive context
Priori to this change, the InMemory API threw when request was emited outside an injection context and that request hit the passThru.
This commit fixes this.

(cherry picked from commit d1cd97648a)
2026-04-15 10:20:53 -04:00
Kam c3d69aeaaa fix(docs-infra): prevent inline code wrapping in CLI reference table
Inline code elements inside table cells inherited `width: 100%` from
the global code styles, causing short codes like `s`, `dev` to stack
vertically instead of rendering on the same line. Add `min-width` to
table cells containing code to ensure proper inline layout.

(cherry picked from commit c8e23d3a9d)
2026-04-14 18:29:30 +03:00
arturovt 684e9fd53d fix(router): normalize multiple leading slashes in URL parser
URLs with three or more consecutive leading slashes (e.g. `///test`) were
parsed incorrectly by `DefaultUrlSerializer`. The parser consumed only two
leading slashes, leaving a third that caused `parseSegment()` to produce an
empty `UrlSegment`. When serialized back, that empty segment rendered as
`//test` — a protocol-relative URL that browsers resolve as a different
origin and reject with a `SecurityError` when passed to
`history.pushState`/`replaceState`.

The fix changes `parseRootSegment()` to consume all consecutive leading
slashes instead of just one, normalizing any number of leading slashes to
a single `/` before the path is parsed.

Closes #49610

(cherry picked from commit c90b6b398e)
2026-04-14 12:34:08 +03:00
Andrew Scott ff0af64ced refactor(compiler-cli): decouple SymbolReference from AST nodes in template checker
To support the need to resolve symbols without full AST access (e.g. when using virtual files), this commit decouples `ReferenceSymbol` from `ts.ClassDeclaration`.

Changes:
- Updated `ReferenceSymbol.target` to use `SymbolReference` instead of `ts.ClassDeclaration`.
- Removed `getReferenceTargetNode()` from `SymbolDirectiveMeta` and transitioned to `getSymbolReference()`.
- Refactored `getTsSymbolOfReference` in `checker.ts` to handle `SymbolReference` and resolve it to a `ts.Symbol` using a position-optimized AST traversal. This avoids using the private `getTokenAtPosition` API and avoids full file scans by only traversing nodes containing the target position.

(cherry picked from commit c2f4b2af7c)
2026-04-14 12:32:54 +03:00
Angular Robot bb8cdd9566 build: lock file maintenance
See associated pull request for more information.
2026-04-14 12:20:59 +03:00
AleksanderBodurri 17ffa19a2d docs(devtools): create router tree documentation
(cherry picked from commit cb19c69ea6)
2026-04-13 21:16:07 +03:00
Michael Small 6c341347b2 docs: add "Using Agent Skills" + command to skills README.md
(cherry picked from commit bb03878ae0)
2026-04-13 21:12:30 +03:00
Ben Hong 8c32f577f1 docs: add new signal forms cross field logic guide
(cherry picked from commit c879cecb45)
2026-04-13 21:07:51 +03:00
Jessica Janiuk aa5d23799b docs: draft PR spam policy addendum
This updates the spam policy to be clear about draft pull requests with regards to the 3 PR limit

(cherry picked from commit eb2b06f3d9)
2026-04-13 20:54:28 +03:00
YooLCD 540536c386 fix(http): add CSP nonce support to JsonpClientBackend
Add support for CSP nonces in JsonpClientBackend by injecting the CSP_NONCE token.
This ensures that dynamically created script tags for JSONP requests include the
required nonce attribute to comply with strict Content Security Policies.

(cherry picked from commit 39e382a756)
2026-04-13 16:01:16 +03:00
Jessica Janiuk f603d4714f fix(core): escape forward slashes in transfer state to prevent crawler indexing
This commit escapes forward slashes in the transfer state JSON output as \u002F to prevent search engine crawlers from aggressively indexing relative paths inside the inline script tag. It also updates related unit and integration tests across core and platform-server.

Fixes #65310

(cherry picked from commit 3c7641151c)
2026-04-13 13:55:00 +03:00
kirjs b72b6b4710 docs(forms): update signal forms migration guide
(cherry picked from commit f25c7ce6a6)
2026-04-13 13:25:44 +03:00
aparziale 3ed14c6354 refactor: Mobile layout api reference
Fix mobile layout shift in API reference

fix #67650

(cherry picked from commit 973ede6ccc)
2026-04-13 11:24:46 +03:00
Angular Robot 236b80b6f9 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-13 11:22:33 +03:00
Michael Small ca5b3c4d3e docs: add dev-app section to contributing docs
docs: link directly to dev-app `README.md`

(cherry picked from commit 59513b740d)
2026-04-13 11:18:37 +03:00
Kam 245bcdd607 docs(docs-infra): fix card container overflow on mobile viewports
Override h2 min-width in docs-card-container-header for small screens
and add docs-content container query fallback to hide SVG illustrations.

(cherry picked from commit c3d4be4a61)
2026-04-13 11:09:54 +03:00
Kam e2e7211530 docs(docs-infra): consolidate tab menu margins for phone breakpoint
Replace separate margin-left/margin-right overrides with a single
margin shorthand in the phone-only media query, aligning spacing
with the base rule and preventing edge collision on small screens.

(cherry picked from commit b5b8631198)
2026-04-13 11:01:47 +03:00
Kam b351d493ea docs(docs-infra): fix essentials next-step navigation pills
Update the "Next step" pill in templates to point to signal-forms
instead of skipping it, and add a next-step pill in signal-forms
linking to dependency-injection.

(cherry picked from commit fda8d201bb)
2026-04-13 10:51:03 +03:00
Kam 096a5c2105 docs(docs-infra): add external links to W3C specs in Angular Aria overview
Link "W3C Accessibility Guidelines" to WCAG 2.2 and "WAI-ARIA patterns"
to the W3C APG patterns page, giving readers direct access to the
referenced specifications.

(cherry picked from commit e8eb179477)
2026-04-13 10:50:00 +03:00
Alan Agius b1407e1add build: update rules_angular setup in MODULE.bazel
Migrate from using use_repo_rule and override_repo directly to using the rules_angular.setup module extension for configuring configurable dependencies.

(cherry picked from commit a268547368)
2026-04-10 20:14:11 +03:00
Kam b4a747a94c docs(docs-infra): fix homepage nav overlay and banner visibility between 701–900px
The homepage navigation bar rendered with `height: 0` on viewports between
701–900px, causing its content to overflow on top of the announcement banner
and block scrolling. Reset nav height to `auto` at tablet sizes, center the
v21 banner, adjust its top margin, and hide the redundant search field since
the nav bar already provides one.

(cherry picked from commit 843f425ec8)
2026-04-10 17:39:36 +03:00
Angular Robot 3ae69406cc build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-10 17:36:09 +03:00
Doug Parker b52a6264ac refactor: add flaky tests workflow
I've had some success asking the Antigravity agent to find flaky tests and propose fixes for them, then just running it in the background and reviewing what it finds. Upstreaming this to the repo so others can use it, since it includes helpful notes like `--runs_per_test` and leveraging random seeds as well as an iteration loop.

I opted not to have the agent do anything with PRs just yet, but if this is useful and we build confidence in it, we can explore that in the future.

(cherry picked from commit 337e6e7d6e)
2026-04-10 16:45:37 +03:00
arturovt dc9581469f docs: add documentation for NG1002
Adds a documentation page for the NG01002 runtime error thrown by
FormGroup and FormArray when setValue is called with a value that is
missing an entry for one or more registered controls.

The error code is also changed from positive (1002) to negative (-1002)
so that Angular appends a link to the error reference page in dev mode,
consistent with how other documented errors (e.g. NG01101, NG01203) are
handled.

(cherry picked from commit 030422850b)
2026-04-10 10:54:46 +03:00
Angular Robot 05d9b97cf9 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-09 14:17:44 +03:00
Andrew Scott 6aafd87038 release: cut the v21.2.8 release 2026-04-08 12:31:46 -07:00
Andrew Scott d4c8a9a887 refactor(compiler-cli): decouple SymbolBuilder from BoundTarget and minimize adapter surface
Decouple `SymbolBuilder` from the full `BoundTarget` interface by introducing a purpose-built `SymbolBoundTarget` interface containing only the 4 methods required for symbol resolution. This eliminates the need for the large, pass-through `BoundTargetAdapter` and further isolates `SymbolBuilder` from compiler-internal implementation details.

Also minimize `TypeCheckableDirectiveMetaAdapter` by redefining `SymbolDirectiveMeta` to not extend `DirectiveMeta`, exposing only the properties actually used by `SymbolBuilder`.

Removed dead code `getDirectiveMeta` in `template_symbol_builder.ts` which was unused.

These changes improve maintainability and ensure a cleaner architecture by strictly defining the boundaries of what `SymbolBuilder` needs from the rest of the system.
By limiting the required inputs to only what's necessary for the implementation, we make it easier to re-use
the implementation between different compiler architectures
2026-04-08 11:59:42 -07:00
N. Coury 057cc6d09d fix(core): remove obsolete iOS cursor pointer hack in event delegation
Since WebKit commit 67a62d98 (merged for iOS 13), WebKit no longer restricts
click event bubbling to interactable nodes like `div` or `body`. The
`cursor: pointer` hack polyfill is therefore obsolete and can safely be
removed without breaking JSAction behavior.

(cherry picked from commit a24179e125)
2026-04-08 18:31:34 +00:00
Angular Robot dea76c7a6e build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-08 10:06:53 -07:00
Alan Agius a07d64b406 docs: fix typos and formatting in spam policy and saved replies
- Enclose the spam saved reply in a code block in `saved-issue-replies.md`
- Correct spelling and punctuation in `saved-issue-replies.md` and `spam.md`

(cherry picked from commit c70b4fec8c)
2026-04-08 16:41:27 +00:00
Kam a6d6842467 docs: fix typos and grammar errors across documentation
Fix various typos, misspellings, and grammar issues across contributing
docs, adev content guides, and agent skills documentation.

- "an minimum" → "a minimum" (CONTRIBUTING.md)
- "GitHub accounts" → "GitHub account" (CONTRIBUTING.md)
- "decendants" → "descendants" (components/styling.md)
- "templates are using" → "templates is using" (hydration.md)
- "A automated" → "An automated" (branches-and-versioning.md)
- "Github" → "GitHub" (branches-and-versioning.md, commit-message-guidelines.md)
- "practices makes" → "practice makes" (caretaking.md)
- "corresponds" → "correspond" (triage-and-labelling.md)
- "one a line" → "a line" (documentation-authoring.md)
- "straight forward" → "straightforward" (using-fixup-commits.md)
- "or you decide" → "or you can decide" (anatomy-of-components.md)
- "whenver" → "whenever" (angular-new-app/SKILL.md)

(cherry picked from commit 4739bde9fb)
2026-04-08 16:40:51 +00:00
Andrew Scott 33a30e0e03 refactor(compiler-cli): Fix regressions caused by ts.typechecker removal
removing ts.typechecker in a prior refactor caused some regressions, particularly when multiple directives
appear on a single elemnt. this is now addressed by using an id for directives and storing that in the tcb comment

(cherry picked from commit 30c950f133)
2026-04-08 15:14:48 +00:00
Angular Robot a385743983 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-07 16:42:35 -07:00
Andrew Scott c9f8f3afb6 test(core): add missing import of ChangeDetectionStrategy in query_spec
Add missing import of ChangeDetectionStrategy in query_spec.ts to fix compilation error.
2026-04-07 14:51:37 -07:00
Andrew Scott 910dcb6d6a refactor(compiler-cli): decouple TemplateSymbolBuilder from ts.TypeChecker
This updates the SymbolBuilder to no longer use ts.TypeChecker internally to
build symbols for the language service. These lookups are deferred/done later
using the newly expanded template type checker API.
2026-04-07 14:51:37 -07:00
Andrew Scott de12bc7e02 refactor(compiler-cli): tag host directives in TCB
Add HOST_DIRECTIVE expression identifier to TCB comments to identify host directives.
2026-04-07 14:51:37 -07:00
Kristiyan Kostadinov a4f312060c refactor(compiler): require a reference in DirectiveMeta
Requires the `DirectiveMeta` to have a `ref` so that we can find duplicates easily.
2026-04-07 14:51:37 -07:00
Kristiyan Kostadinov de533fe491 refactor(compiler-cli): move ClassPropertyMapping into compiler
Moves the `ClassPropertyMapping` into the compiler, rather than having to pass around the limited `InputOutputPropertySet` interface that is only implemented by `ClassPropertyMapping`.
2026-04-07 14:51:37 -07:00
Kristiyan Kostadinov ea1e34c4dd refactor(compiler): move matchSource into base metadata
Moves the `matchSource` into the base metadata so the binder can use it.
2026-04-07 14:51:37 -07:00
Kristiyan Kostadinov 304222014a refactor(compiler-cli): pre-compute key
Updates the TCB metadata to pre-compute and store the `TcbReferenceKey`, instead of computing it on the fly.
2026-04-07 14:51:37 -07:00
splincode 82192deda9 fix(core): handle missing serialized container hydration data
Simplify the hydration regression test by removing conditional early-return branches and relying on direct Jasmine expectations while keeping strict typing and OnPush configuration.

(cherry picked from commit 77f1ca08e4)
2026-04-07 18:22:07 +00:00
Angular Robot e8265f4593 build: lock file maintenance
See associated pull request for more information.
2026-04-07 09:49:43 -07:00
Kam c0496c1f39 docs(docs-infra): fix v21 event video not responsive on mobile
Replace raw iframe with docs-video component to fix YouTube embed
overflowing on mobile viewports.

(cherry picked from commit 1c9c4536d6)
2026-04-07 16:47:54 +00:00
Stephen Fluin 2d2ba938da docs(docs-infra): warning about upgrading to v21
(cherry picked from commit 64b52c1a30)
2026-04-07 16:47:17 +00:00
Kam ff8911fe52 docs(docs-infra): preserve navigation origin when clicking cross-category links
When a sidebar item links to a page in a different category (e.g., Route
transition animations under Animations links to a Routing page), clicking
back navigates to the main menu instead of the originating category.

Store the originating category in NavigationState when clicking a
cross-referenced item, so the back button returns to the correct section.

(cherry picked from commit 8132a96884)
2026-04-07 16:46:23 +00:00
Doug Parker 72d7a47dfd docs: add spam policy
This defines an initial policy with regard to issue / PR spam as well as a saved reply for bulk-closing large issue / PR counts at once.

(cherry picked from commit 19ce90fe9b)
2026-04-07 16:32:19 +00:00
Kristiyan Kostadinov 2c6781071f fix(compiler-cli): error for type parameter declarations
Fixes an error that was heppning when a generic param has type parameters of its own. There were a few different issues going on:
1. In #67707 I had changed a bit how we pass the `genericContextBehavior` which ended up ignoring the `useContextGenericType` option from the environment.
2. All directives depend on themselves, but we were overridding the `genericContextBehavior` for the directive being processed.
3. The type translator wasn't handling type parameter declarations. Technically we shouldn't be able to hit a code path that has a type parameter, however it's also easy enough to handle so we might as well.

Relates to #67704.

(cherry picked from commit ab061a7610)
2026-04-07 16:29:37 +00:00
Kristiyan Kostadinov e40d378f3e fix(compiler): handle nested brackets in host object bindings
Fixes that we were parsing bindings in the `host` object with a regex that didn't account for nested brackets which may come up with something like Tailwind.

Fixes #68039.

(cherry picked from commit 2ce0e98f79)
2026-04-06 20:21:54 +00:00
Kristiyan Kostadinov d715c366d9 refactor(compiler-cli): fix failing tests
Fixes some tests that started failing after recent changes.

(cherry picked from commit fd95735594)
2026-04-06 12:33:09 -07:00
Savio Dsouza c91bd074c0 ci: use immutable sha for checkout
Change to immutable SHA for checkout reference.

(cherry picked from commit 6e1e9766a5)
2026-04-06 11:47:06 -07:00
Angular Robot 2ec9ff087f docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-04-06 11:35:04 -07:00
Doug Parker 8102331f82 test(http): disable XSRF and mock location in HttpClient tests to avoid Domino failures and state leakage
The `HttpClient` tests in `client_spec.ts` were failing intermittently in Node/Domino environment because `MockPlatformLocation` defaults to `http://_empty_/`. This valid URL satisfied the URL parser in `xsrfInterceptorFn`, causing it to proceed to cookie extraction which throws `NotYetImplemented` in Domino.

To fix this:
1. Disabled XSRF protection in `client_spec.ts` using `withNoXsrfProtection()`, as these tests are not for XSRF.
2. Provided `ɵprovideFakePlatformNavigation` to remove state leakage effects and ensure consistency.

(cherry picked from commit 1ef503e18e)
2026-04-06 18:05:58 +00:00
SkyZeroZx 44fc79b7f7 docs(docs-infra): Adds anchor links to class member headers for linking
Adds anchor links to class member headers for direct linking.
Add test to ensure anchors render correctly.

Fixes angular#67970
2026-04-06 11:05:20 -07:00
funsaized 39827a08fe fix(docs-infra): align search result icon with text on mobile
On narrow viewports, the search result icon was pushed to its own flex line when the title text was too long, causing vertical misalignment.

The fix wraps the title text and package badge in a single container that manages its own flex layout, preventing the icon from being separated from the text on narrow viewports.

Fixes #68005

(cherry picked from commit d95e856a25)
2026-04-06 17:57:13 +00:00
Doug Parker 04f5841eed test(platform-server): fix race condition in incremental hydration test
The test was using a brittle fixed timeout of 10ms to wait for change detection to run in Zoneless mode. This failed in CI sometimes presumably because CI can execute slower based on resource constraints. This commit replaces it with a polling approach which checks until the expected content is rendered.

(cherry picked from commit 4a174b89c8)
2026-04-03 23:47:00 +00:00
Doug Parker 958fc6ab8a test(platform-server): replace fixed timeout with polling in event replay test
This test appears to be flakey in CI, presumably because resource constrained environments can run unexpected slower and exceed the timeout. This switches to a polling approach, waiting for the queue to drain.

(cherry picked from commit b4a3abd095)
2026-04-03 13:50:09 -07:00
Angular Robot cbfd1ee571 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-03 12:45:01 -07:00
Harmeet Singh b0dc2fbfcb docs(forms): clarify disabled FormArray value behavior
Document that FormArray.value includes only enabled child controls when the array is enabled, but includes all child values when the FormArray itself is disabled.

Fixes #67759

(cherry picked from commit 789c2cd9fb)
2026-04-03 18:22:37 +00:00
Angular Robot ef204bdf7a build: update bazel dependencies
See associated pull request for more information.
2026-04-03 10:59:22 -07:00
Angular Robot 4441a95119 build: update cross-repo angular dependencies to v21.2.5
See associated pull request for more information.
2026-04-02 15:50:14 -07:00
SkyZeroZx d150e2672e docs(docs-infra): Enhances update guide layout responsiveness
The version dropdown width now uses `clamp()` for better responsiveness.

(cherry picked from commit 164cf98879)
2026-04-02 22:49:32 +00:00
Kam 59f9912dc1 feat(docs-infra): update Stack Overflow icon to new logo
Updated the Stack Overflow icon in the navigation social menu to use the new Stack Overflow logo.

(cherry picked from commit a6a5e8a4a5)
2026-04-02 22:48:15 +00:00
Kam bce82bdc34 feat(docs-infra): add Stack Overflow link to navigation social menu
Added Stack Overflow icon and link to the navigation component.

(cherry picked from commit ba70e8ba0c)
2026-04-02 22:48:15 +00:00
Jessica Janiuk 2ae0912eea refactor(core): address review comments on NG0750 error message
This commit addresses review comments from AndrewKushnir regarding conditional formatting of error messages and updating tests.

(cherry picked from commit 30f63fc1c2)
2026-04-02 21:55:47 +00:00
Jessica Janiuk e583f4c808 refactor(core): Add more detail to NG0750 error message
This adds a bit more context to the NG0750 error message to provide details about which module failed to load when executing the dependencyResolverFn. This can help with debugging a failed lazy load in a defer block.

(cherry picked from commit 8218d2e34a)
2026-04-02 21:55:47 +00:00
Angular Robot 05bcc601ac build: update all github actions
See associated pull request for more information.
2026-04-02 13:00:00 -07:00
Angular Robot 9f61910923 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-01 14:36:13 -07:00
Andrew Scott 7797671257 fix(language-service): get quick info at local var location to align with TS semantics and support type narrowing
Previously, the Language Service fetched Quick Info and definitions for template variables (such as `@let` declarations) using mapping to their `initializerLocation` (the right-hand side expression). This aggressively bubbled the type, JSDoc, and definition identity of the initializer backwards onto the variable itself.

This approach had two flaws:
1. It broke type narrowing because the LS read the original un-narrowed type from the source expression rather than the type of the narrowed intermediate variable in the Type Check Block.
2. It deviated from native TypeScript semantics, where a local `let` binding (`let address = hero.address`) does not inherit the docstrings or `(property)` kind of its initializer, acting solely as a local inferred variable.

By using `localVarLocation` rather than `initializerLocation` for LetDeclaration Quick Info and Type Definitions, these intermediate variables now properly preserve type narrowing within templates and flawlessly match the standard behavior expected of TypeScript block variables. `VariableSymbol.initializerLocation` is retained solely to map the value spans of structural directive contexts (e.g., `exportAs` strings).

fixes #65491

(cherry picked from commit 75ac120493)
2026-04-01 19:22:11 +00:00
SkyZeroZx 0b08e29f26 test(core): refactors test to use timeout utility
Replaces direct `setTimeout` wrapped in a Promise with the `timeout` helper from `@angular/private/testing`

(cherry picked from commit c15e3a005d)
2026-04-01 20:46:05 +02:00
Pawel Kozlowski 50761c8be4 release: cut the v21.2.7 release 2026-04-01 20:36:00 +02:00
Matthieu Riegler 8d56b17b95 ci: exclude test files from primitives review
Those files aren't synced into G3 and shouldn't require external reviews

(cherry picked from commit bf8105ef76)
2026-04-01 20:27:31 +02:00
Angular Robot 4ad6d582d2 build: update cross-repo angular dependencies to v21.2.6
See associated pull request for more information.
2026-04-01 18:25:52 +02:00
Angular Robot f363ab41f1 build: update cross-repo angular dependencies to 616a50d
See associated pull request for more information.
2026-04-01 13:21:58 +02:00
Andrew Scott 0960592d3d fix(router): pass outlet context to split to fix empty path named outlets
The `split` helper function in `packages/router/src/utils/config_matching.ts` was blind to the current outlet being processed. When encountering an empty path named outlet in the config, it would assume it needed to pull it in as a synthetic empty group, even if we were already in the process of resolving that very outlet!

When navigating to `/(secondary:component-copy)` with this config:

```typescript
{
  path: '',
  component: MainLayout,
  children: [
    { path: '', outlet: 'secondary', component: SecondaryComponent, children: [{path: 'component-copy'}] }
  ]
}
```

The router uses `MainLayout` as a pass-through and calls `split` on its children with segments `['component-copy']`.
`split` uses the `containsEmptyPathMatchesWithNamedOutlets` helper to determine if there are any candidate empty path named outlets to pull in. Because of this, it sees `{ path: '', outlet: 'secondary' }` and says: "Ah, an empty path named outlet! I must pull it in!"
Rather than falling through to standard segment matching, it returns `UrlSegmentGroup(segments: [], children: {secondary: emptyGroup})`.
The router then tries to process `primary` (with `[]` segments) and fails because the config only has `secondary`. It also tries to process `secondary` with the `emptyGroup`. While `{ path: '', outlet: 'secondary' }` matches the empty group, its child `{ path: 'component-copy' }` fails to match because the `emptyGroup` has no segments! So both branches fail, resulting in a `NoMatch` error for the entire navigation!

Pulling in empty path named outlets IS desired when they act as siblings to segments we are matching. This has worked before and continues to work!

```typescript
{
  path: 'a',
  children: [
    { path: 'b', component: ComponentB },
    { path: '', component: ComponentC, outlet: 'aux' }
  ]
}
```

When navigating to `a/b`, `split` sees segments `['b']` and the `aux` empty path. It pulls in `aux` so it gets instantiated alongside `b`. This is correct!

If we have a named outlet with a non-empty path under an empty path parent:

```typescript
{
  path: '',
  component: MainLayout,
  children: [
    { path: 'component-copy', outlet: 'secondary', component: ComponentE }
  ]
}
```

When we navigate to `/(secondary:component-copy)`:
- `split` uses `containsEmptyPathMatchesWithNamedOutlets` to see if there are any empty path named outlets. Since it only sees `path: 'component-copy'`, it returns `false`.
- It falls through to standard segment matching, which finds `component-copy` in the segments array and activates it flawlessly!

This worked perfectly before the fix because it didn't use `containsEmptyPathMatchesWithNamedOutlets`.

The fix passes the **current active outlet context** into `split`. If `split` finds an empty path named outlet that matches the outlet we are already processing, it ignores it as a pull-in candidate.

When evaluating `MainLayout` children for `secondary`:
- URL Segments left to process: `['component-copy']`
- Current Outlet: `secondary`
- `childConfig`: `[{ path: '', outlet: 'secondary' }]`

Previously, `split` saw the empty path and pulled it in as a synthetic empty group, breaking matching. Now, since `getOutlet(r) === outlet` (both are `secondary`), the fix ignores it. Instead of returning empty segments, it **falls through to standard segment matching**, which successfully find the `component-copy` segment!

When evaluating `ComponentA` children for `primary`:
- URL Segments left to process: `['b']`
- Current Outlet: `primary`
- `childConfig`: `[{ path: 'b' }, { path: '', outlet: 'aux' }]`

Since `getOutlet(aux) !== primary`, the fix **does not ignore it**. `split` pulls in `aux: emptyGroup` as a sibling, instantiating `ComponentC` alongside `ComponentB`. This preserves correct behavior for auxiliary outlets!

fixes #67708

(cherry picked from commit daa9b2a9d6)
2026-04-01 11:48:47 +02:00
Alan Agius d04ddd73df fix(core): prevent binding unsafe attributes on SVG animation elements (#67797)
SVG animation elements (`animate` and `set`) can be used to animate sensitive attributes like `href` or `xlink:href`. Binding to these animation attributes (like `to`, `from`, or `values`) with a sensitive target creates an XSS vector.

This change mitigates this risk by:
1. Classifying `to`, `from`, and `values` on `<animate>` and `<set>` elements as `ATTRIBUTE_NO_BINDING` in the DOM security schema to prevent standard dynamic bindings.
2. Adding runtime validations in `ɵɵvalidateAttribute` to verify that `attributeName` is not a sensitive attribute (such as `href` or `xlink:href`) when processed by a set of `SECURITY_SENSITIVE_ATTRIBUTE_NAMES`. If it is, a runtime error `UNSAFE_ATTRIBUTE_BINDING` is thrown.
3. Adding regression tests in `integration_spec.ts` to ensure unsafe bindings throw an error while safe ones pass correctly.

PR Close #67797
2026-04-01 11:43:59 +02:00
Alan Agius b682c62873 fix(core): treat object[data] as resource URL context (#67797)
Previously, the `data` attribute of the `<object>` tag was being sanitized as a regular URL instead of a `ResourceURL`, which is security-sensitive.
This commit updates the runtime sanitization logic to correctly identify `object[data]` as a `ResourceURL` context. Additionally, the sanitizer lookup logic has been refactored to use a more efficient lookup map (`RESOURCE_MAP`) instead of multiple `Set` lookups, providing better performance and maintainability.

Added tests to verify the correct sanitization of `object[data]` and its behavior with trusted values.

PR Close #67797
2026-04-01 11:43:59 +02:00
Alan Agius fea25d1a60 fix(compiler): register SVG animation attributes in URL security context (#67797)
This change is a security hardening measure to prevent potentially unsafe attribute value manipulation through SVG animations. By mapping `animate|to`, `animate|from`, `animate|values`, and `set|to` to the `SecurityContext.URL`,  Angular will now automatically sanitize these attributes.

PR Close #67797
2026-04-01 11:43:59 +02:00
Kam f916531ee1 docs(docs-infra): improve angular-new-app skill
Consolidate duplicate persona intro, add commonly useful ng new flags
and missing generators to scaffolding guidelines.

(cherry picked from commit f257f54967)
2026-04-01 09:26:41 +02:00
tomer953 8fd896e99a fix(core): resolve component import by exact specifier in route lazy-loading schematic
Avoid substring matching on importClause.getText() which caused suffix collisions (e.g., BarComponent vs FooBarComponent). Use AST-based matching for default and named (including aliased) imports to reliably resolve the correct import path when generating loadComponent.

(cherry picked from commit 8fa6617352)
2026-04-01 09:24:13 +02:00
Kam 895c576d49 refactor(forms): use strict equality for pending status getter
The `pending` getter in `AbstractControl` used loose equality (`==`)
while all other status getters (`valid`, `invalid`, `disabled`) use
strict equality (`===`). Both sides are strings so behavior is
identical, but this inconsistency would fail strict linting rules.

(cherry picked from commit ef7679b7a5)
2026-03-31 13:52:00 +02:00
Angular Robot 5fd4f0f854 build: lock file maintenance
See associated pull request for more information.
2026-03-31 13:42:53 +02:00
Angular Robot 429513bed0 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-31 12:02:18 +02:00
Alan Agius f22d9a7098 docs: modernize CLI reference for build and test
Updates the Angular CLI reference to reflect current framework defaults:
- Changes the recommended application builder to @angular/build:application.
- Replaces Jasmine and Web Test Runner with Vitest as test runner examples.

(cherry picked from commit 1a6785874e)
2026-03-31 11:56:07 +02:00
Angular Robot cf7846bd62 build: update pnpm to v10.33.0
See associated pull request for more information.
2026-03-30 12:47:07 +02:00
Matthieu Riegler 9ea8cb6eea docs(docs-infra): sanitize markdown tooltip in Code editor
(cherry picked from commit 0f960a5514)
2026-03-30 12:16:16 +02:00
Alan Agius 3c41e74fdd fix(localize): validate locale in getOutputPathFn to prevent path traversal
The `localize-translate` CLI tool uses the `locale` field from translation files to expand the `{{LOCALE}}` placeholder in the output directory. It failed to sanitize `locale` input, allowing malicious translations to write files outside of the configured output directory.

This change mitigates this issue by combining.

Closes #67906

(cherry picked from commit 7871093822)
2026-03-30 12:15:31 +02:00
Shuaib Hasan Akib efbba945bc docs: align list formatting and improve emphasis
Aligns list formatting, replaces the “Helpful” block with an
IMPORTANT note for better visibility, and removes the separate
example file by inlining the single relevant line directly
in the documentation.
2026-03-30 11:12:29 +02:00
SkyZeroZx 7d54952e85 docs: update signal form tutorial
(cherry picked from commit 713eca74e7)
2026-03-30 11:11:28 +02:00
SkyZeroZx 94b1b530dc docs: update url from <base href>
(cherry picked from commit c6f73f4127)
2026-03-30 10:44:20 +02:00
marktechson 0c9c270552 docs: add agent skills documentation and new readme
(cherry picked from commit 86bbc9474c)
2026-03-27 11:39:57 -07:00
Georgi Serev 9b48cb2989 docs(docs-infra): introduce a custom UrlSerializer
The custom serializer should handle Adev-specific behavior like decoding encoded forward slash similarly to the app host.

(cherry picked from commit 9d79ec6866)
2026-03-27 17:17:55 +01:00
Andrei Chmelev bba5ed8e64 fix(compiler-cli): prevent recursive scope checks for invalid NgModule imports
Avoid recursive local scope lookups when invalid NgModule imports create import cycles.

(cherry picked from commit fcd0bb0db8)
2026-03-27 16:10:08 +01:00
Angular Robot 56c872dacc docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-03-27 14:13:13 +01:00
Angular Robot c8902deb00 build: update all github actions
See associated pull request for more information.
2026-03-27 14:02:11 +01:00
Angular Robot 4b2008d0f2 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-27 14:00:33 +01:00
Andrew Scott b453c0ce67 refactor(language-service): Update getTcbNodesOfTemplateAtPosition to be usable without compiler (#67898)
updates getTcbNodesOfTemplateAtPosition to be usable without ngCompiler instance
so it can be shared with more compiler types

PR Close #67898
2026-03-26 21:32:20 +00:00
Andrew Scott a9ca90fc11 refactor: fix types extraction for private (#67898)
fixes types extraction for private entrypoint of language service

PR Close #67898
2026-03-26 21:32:20 +00:00
Jessica Janiuk 807cabd9e1 fix(dev-infra): improve PR review skill handling of git worktrees
The current PR review skill blindly attempts to checkout branches using the `gh` CLI.
This creates fatal errors if the branch being checked out is already tied to a different git worktree.
Additionally, the logic didn't give the user a clear way to enforce a remote code review when they are the author.

This change updates the `Execution Workflow` to prioritize an explicit user instruction to review remotely, and updates the `Local Code Review` instructions to enforce checking for worktree conflicts before executing local checkouts.
2026-03-26 18:45:39 +01:00
Doug Parker 13f050d220 test: construct local Date objects to fix timezone flakiness
Replaced testing constructions of `Date` objects from `formatDate` tests from plain ISO strings over to 'new Date(year, month, date)'.

Instantiating 'new Date("2024-01-01")' parses the string strictly as UTC midnight ("2024-01-01T00:00:00.000Z"). When local operations execute (such as calculating `getThursdayThisIsoWeek` boundaries), the UTC date shifts relative to the executing machine's timezone. For example, in PST (GMT-8), that date translates exactly to 'December 31st 16:00:00', pushing week boundaries backwards.

By wrapping date constructs explicitly as 'new Date(2024, 0, 1)', it natively guarantees local midnight execution and prevents boundaries shifting on global CI Remote Build Execution (RBE) workers.

Example (from a machine in PST):

```javascript
> new Date('2024-01-01')
Sun Dec 31 2023 16:00:00 GMT-0800 (Pacific Standard Time)
> new Date(2024, 0, 1)
Mon Jan 01 2024 00:00:00 GMT-0800 (Pacific Standard Time)
```

(cherry picked from commit 61ee183fa7)
2026-03-26 18:34:13 +01:00
Doug Parker d0cf2995a2 test: remove unsupported timezone from formatDate tests
Removes the 'America/New_York' timezone string test case from `formatDate` tests because the underlying `Date.parse` API does not support IANA timezone strings. This caused the timezone calculation to silently fall back to the local executing machine's timezone, leading to non-deterministic test flakiness on Remote Build Execution (RBE) workers operating in varying geographic locations.

(cherry picked from commit a1385ad977)
2026-03-26 18:34:13 +01:00
SkyZeroZx a35d572b22 docs: fix indentation that breaks roadmap rendering
(cherry picked from commit ecc616b94b)
2026-03-26 18:33:06 +01:00
cexbrayat 80fd08bcc8 docs: remove private utils from testing skills
(cherry picked from commit 9bb1e78969)
2026-03-26 18:29:24 +01:00
Leon Senft d8239c7836 release: cut the v21.2.6 release 2026-03-25 15:42:09 -07:00
Alan Agius c1579163b7 build: consolidate domino bundling in platform-server
Move the domino bundling logic and related shims into a centralized third_party directory within packages/platform-server. This avoids duplication of the bundling logic and ensures consistent shimming across the platform-server package and its entry points.

Following a conversation with OSS licensing, this change also includes the domino LICENSE file in the generated npm package to comply with licensing requirements for bundled third-party code.

```
├── fesm2022
│   ├── init.mjs
│   ├── init.mjs.map
│   ├── platform-server.mjs
│   ├── platform-server.mjs.map
│   ├── _server-chunk.mjs
│   ├── _server-chunk.mjs.map
│   ├── testing.mjs
│   └── testing.mjs.map
├── LICENSE
├── package.json
├── README.md
├── third_party
│   └── domino
│       ├── bundled-domino.d.ts
│       ├── bundled-domino.mjs
│       ├── bundled-domino.mjs.map
│       └── LICENSE
└── types
    ├── init.d.ts
    ├── platform-server.d.ts
    └── testing.d.ts
```

(cherry picked from commit b40d11eec4)
2026-03-25 13:31:10 -07:00
Angular Robot dbb15ebab2 build: update dependency node to v22.22.2
See associated pull request for more information.
2026-03-25 13:29:38 -07:00
Andrew Scott a6c49e0ea9 refactor(language-service): Export template target from API
allows template target to be used in other tooling

(cherry picked from commit eecfa4c909)
2026-03-25 13:07:47 -07:00
Michael Small 2c12339ab8 docs(forms): replace rxResource request w/ params
(cherry picked from commit 89629d8ac1)
2026-03-25 13:04:57 -07:00
Angular Robot a3048f231c build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-25 12:59:42 -07:00
Alan Agius ae2f2497d3 docs: reword allowedHosts security warning
Update the allowedHosts security warning in the security guide to remove the mention of DNS rebinding, which is primarily relevant for the dev server, and refocus on host header injection and SSRF. Additionally, clarify that allowing all hosts with "*" is only appropriate when header validation is handled by an external layer.

(cherry picked from commit 6f20fb513c)
2026-03-25 12:56:46 -07:00
Alan Agius 2c7d3b5704 build: re-sync file
Fixes patch CI due to missing synced file.
2026-03-25 10:53:09 +01:00
guidettj 6bd2121817 docs: fix incorrect getHarnesses() method to getAllHarnesses and broken link
(cherry picked from commit 050b14bd7f)
2026-03-24 15:35:36 -07:00
SkyZeroZx e8c047bd8d docs: update defer section to Markdown and fix absolute URL to relative in adev
(cherry picked from commit 098553bfe4)
2026-03-24 15:35:02 -07:00
hawkgs a0ca5a50b2 docs(docs-infra): redefine /guide/pipes redirect
Update the definition of the `/guide/pipes` redirect in order to avoid breaking the `a.dev/guide` redirect to Not Found page.

(cherry picked from commit 78c2d0aa19)
2026-03-24 15:17:15 -07:00
Fausto Davila 1cdb322600 docs: fix typo in end-to-end.md regarding e2e command
(cherry picked from commit c9f7a7f649)
2026-03-24 15:15:14 -07:00
Jens Kuehlers c9585b7159 docs: update release date to not clash with Google I/O 2026
(cherry picked from commit b4ae9cf040)
2026-03-24 15:14:38 -07:00
Angular Robot 238b07fe90 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-24 15:13:56 -07:00
Angular Robot 3b3ab8b626 build: lock file maintenance
See associated pull request for more information.
2026-03-24 15:08:55 -07:00
weedorflow e731bbdd14 docs: clarify size budget configuration
(cherry picked from commit 37b1c5d0fe)
2026-03-24 14:49:38 -07:00
Aleksander Bodurri c7a18924a6 fix(devtools): fix incorrect logic in destroy function for ChromeMessageBus
Destroy uses window.removeEventListener but the ChromeMessageBus doesn't actually depend on a window object.

In practice this code is unlikely to ever be reached. If a tab is closed the entire context script JS process is killed so this is not an bug that would be very common or even reachable. That being said for correctness this should not be using window.

(cherry picked from commit 36edf4870f)
2026-03-23 14:51:32 -07:00
Joey Perrott 244e0b0b59 ci: correct capitalization of MarkTechson in pullapprove
Correct the capitalization of MarkTechson's username to match their GitHub profile, ensuring proper evaluation by PullApprove.

(cherry picked from commit 543753f551)
2026-03-23 14:50:23 -07:00
Alan Agius 9bfe1a6065 docs: remove redundant ng command from npx instructions in Angular Developer skill
(cherry picked from commit b89af3c8da)
2026-03-23 14:49:30 -07:00
Modeste ASSIONGBON b658accf1f docs: fix js doc of signal forms ignoreValidators option.
(cherry picked from commit 2615f35da9)
2026-03-23 11:21:21 -07:00
Pushkar-Mahajan4 9be5e2c211 docs: fix typo in Input decorator
(cherry picked from commit 1128e78913)
2026-03-23 11:19:51 -07:00
SkyZeroZx 8818095a82 docs(docs-infra): fix aria-label parsing breaking headings
Strip all HTML tags and escape quotes in aria-label to avoid breakage

(cherry picked from commit 6d2eed61a1)
2026-03-23 10:33:19 -07:00
splincode 80c85ec8a5 refactor(devtools): improve test descriptions by fixing spelling
Fixed misspellings in test descriptions in devtools/projects/shell-browser/src/app/tab_manager_spec.ts: recieved/recieves → received/receives in three it(...) titles.

(cherry picked from commit 25dad82e43)
2026-03-23 10:32:44 -07:00
splincode fb7a10fb18 docs: fix typos in ssr-benchmarks README.md
Corrected typos in modules/ssr-benchmarks/README.md: mesure→measure, Struture→Structure, render→renders, benckmark→benchmark, capitalized DevTools, and clarified the flame chart instruction.

(cherry picked from commit 13c198ae63)
2026-03-23 10:27:43 -07:00
SkyZeroZx 1af0db5742 docs(docs-infra): replace non-interactive buttons with spans
These elements are not interactive, so using <button> is misleading for accessibility
(screen readers and keyboard navigation expect an action).

(cherry picked from commit ad3991cd0b)
2026-03-23 10:24:13 -07:00
Alan Agius a821e06e33 ci: support publishing dev-skills to snapshot repository
Updates the snapshot publishing script to package the contents of
`skills/dev-skills` and publish them to the `angular/skills`
repository.

The changes include:
- Ensuring the script always runs from the repository root.
- Updating `publishRepo` to support an optional third argument for
  specifying a custom repository name (defaulting to `-builds`).
- Implementing `publishDevSkills` to package individual skills at the
  root of the snapshot repository.

(cherry picked from commit 293ac66a9f)
2026-03-23 09:49:15 -07:00
Matthieu Riegler a21be36e15 refactor: prepare for required changeDetection prop on G3.
We'll make this a G3 only change to prevent backsliding during the transition period.

(cherry picked from commit d2054c7c1a)
2026-03-20 15:52:42 -07:00
Angular Robot 7aaa8b9b39 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-03-20 15:39:47 -07:00
Angular Robot d0481860bf build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-20 15:23:08 -07:00
Matt Lewis 880a57d4b3 fix(compiler): prevent shimCssText from adding extra blank lines per CSS comment
The comment placeholder restoration in `shimCssText` appended an unconditional
`+ '\n'` to each non-hash comment replacement. Because `_commentRe` does not
consume the newline that follows a comment in the source, that newline already
remains in `cssText`. The extra `'\n'` was therefore inserted on top of the
existing one, shifting every line after each comment down by one. In files with
many comments (e.g. large SCSS preambles) this shifts all subsequent CSS rules
far enough that the CSS sourcemap — generated before `shimCssText` runs —
points to completely wrong source locations in browser DevTools.

The fix is to drop the `+ '\n'`; internal newlines within a multi-line comment
are still preserved via `_newLinesRe`, and the trailing newline that follows the
comment in `cssText` is already present without any extra injection.

(cherry picked from commit 5a712d42d1)
2026-03-20 15:17:35 -07:00
Angular Robot 1ba89d1128 build: lock file maintenance
See associated pull request for more information.
2026-03-20 15:14:25 -07:00
Matthieu Riegler 831746eff1 docs: Add callout about the Component interface.
(cherry picked from commit e01573fbca)
2026-03-19 16:14:22 -07:00
Jaime Burgos 9182b62b96 docs(forms): add section on managing validators dynamically in form validation guide
(cherry picked from commit eb53392b10)
2026-03-19 16:07:54 -07:00
Angular Robot 4d2a9394c3 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-19 16:03:49 -07:00
Jessica Janiuk ad0156e056 fix(core): fixes a regression with animate.leave and reordering
PATCH PR for #67765

This fixes a regression bug that resulted in reordered elements not getting properly removed from the DOM. Reused nodes were not being cleared out in this situation.

fixes: #67728
2026-03-19 15:52:35 -07:00
Angular Robot aa3220a4b5 build: update dependency aspect_rules_ts to v3.8.7
See associated pull request for more information.
2026-03-19 15:23:54 -07:00
SkyZeroZx b4ab6ba2e8 fix(common): avoid redundant image fetch on destroy with auto sizes
prevents browsers from re-fetch image during DOM teardown
when using `sizes="auto"` with lazy loading.

Fixes angular#67055

(cherry picked from commit c1312da183)
2026-03-19 15:21:20 -07:00
aparziale 73d6b01b47 fix(migrations): inject migration not work in multi-project workspace with option path
Fix inject migration in multi-project workspace. The inject migration doesn't work when targeting one of the projects due to either not finding any files in other projects or considering them external thus it throws a SchematicsException

Fixes: #66074
(cherry picked from commit a73b4b7c30)
2026-03-19 15:20:46 -07:00
Angular Robot 3838554503 build: update cross-repo angular dependencies to v21.2.3
See associated pull request for more information.
2026-03-19 15:04:08 -07:00
Angular Robot 1148c93834 build: update all github actions
See associated pull request for more information.
2026-03-19 15:02:54 -07:00
Matthieu Riegler 9f92312cde docs(docs-infra): fix deprecation style for light theme
(cherry picked from commit cc07d46e49)
2026-03-19 15:00:31 -07:00
Doug Parker 04b16dee8f refactor: ignore pnpm-lock.yaml in Gemini code reviews
It can't give much useful feedback so this just introduces noise into Renovate PRs.

(cherry picked from commit 12ea6efc9d)
2026-03-19 14:56:00 -07:00
Matthew Beck 57ce2b64ef release: cut the v21.2.5 release 2026-03-18 17:33:53 -06:00
Angular Robot 5393d8ea2c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-03-18 14:08:01 -06:00
SkyZeroZx 675d4fb489 docs: update import and note formatting in guides
(cherry picked from commit a8bf957086)
2026-03-18 13:04:21 -07:00
Jessica Janiuk 851ef77318 Revert "refactor(core): Ensure determineLongestAnimation is run synchronously after style applies"
This reverts commit 318ade062e.

(cherry picked from commit 890c97301f)
2026-03-18 10:30:40 -07:00
Yenya030 5800f17e19 refactor(service-worker): remove unnecessary cast in mock redirect check
Use the typed Response.redirected property directly in the service-worker test mock instead of casting to any.

(cherry picked from commit 57a07d0058)
2026-03-18 10:26:26 -07:00
Yenya030 e19150d2b5 fix(service-worker): preserve redirect policy on reconstructed asset requests
Preserve the redirect mode when rebuilding asset requests in newRequestWithMetadata(). This keeps explicit redirect:error semantics intact across service-worker redirect handling.

Update the worker test mocks to model redirect defaults correctly and add focused regression coverage for redirected lazy assets with redirect:error.

(cherry picked from commit 07abfbcc6c)
2026-03-18 10:26:25 -07:00
SkyZeroZx 0e496c1d85 docs(docs-infra): improve semantic HTML in update guide
Improves update guide's semantic HTML
2026-03-18 09:42:32 -06:00
kirjs 737777ef72 docs: add Angular Developer Skill updates
Includes:

- Imports and setup instructions

- Validation examples (sync, async, conditional)

- FieldState vs FormField distinction

- Common pitfalls and best practices

- Full-featured example application

(cherry picked from commit ed150e52d1)
2026-03-17 17:39:44 -07:00
marktechson fa26e7271f docs: adds angular-developer skill
Adds a new agent skill focused on providing fundamentals to coding agents and adhering
to modern Angular code including Signals, Signal Forms and other latest updates.

(cherry picked from commit 8291b16a36)
2026-03-17 17:39:43 -07:00
aparziale 076d41c3f6 fix(migrations): prevent trailing comma syntax errors after removing NgStyle
This fixes an issue where when removing NgStyle from the imports array of a component, an extra trailing comma would be left behind if it was the last element in that component`.

(cherry picked from commit 730684b9ce)
2026-03-17 17:01:28 -07:00
JoostK a8f80c1f99 refactor(core): declare explicit reactive node prototypes types
These type annotations allow TS to associate the object's properties
with their corresponding declaration in the interfaces, enabling
much better code navigation. For example, "Find all implementations"
for `ReactiveNode.producerRecomputeValue` now finds the implementation
in `COMPUTED_NODE` and `LINKED_SIGNAL_NODE`.

(cherry picked from commit 1eaf92077f)
2026-03-17 13:00:15 -07:00
JoostK bf948be4c2 fix(core): run linked signal equality check without reactive consumer
This commit ports the changes in #55818 from `computed` to `linkedSignal`,
which duplicates the core logic to recompute the downstream value for an
upstream change.

(cherry picked from commit 523d69a768)
2026-03-17 12:59:42 -07:00
yogeshwaran-c 23ea431c4e fix(compiler): parse named HTML entities containing digits
The lexer's isNamedEntityEnd function stopped scanning entity names
when encountering a digit character, causing 24 valid HTML named
entities with digits in their names (e.g. &sup1;, &frac12;, &blk34;)
to be treated as plain text instead of decoded to their corresponding
Unicode characters.

Fixes #51323

(cherry picked from commit 75560ce43d)
2026-03-17 12:54:45 -07:00
Alan Agius 2fb767b139 build: remove redundant Bazel lockfile update workarounds
Renovate now natively supports updating Bazel lockfiles.

This change removes the `postUpgradeTasks` workaround in Renovate config

(cherry picked from commit a37dd59fc4)
2026-03-17 12:53:11 -07:00
Angular Robot b10e305ccc build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-17 13:52:37 -06:00
Alan Agius f0d19b88b1 docs: clarify X-Forwarded-Prefix header validation rules
(cherry picked from commit d0086e493b)
2026-03-17 12:50:15 -07:00
Kristiyan Kostadinov 67e0ba7e03 fix(compiler-cli): generic types not filled out correctly in type check block
Fixes a regression caused by the recent TCB changes where we moved the type parameter processing earlier in the pipeline and stopped properly accounting for the `TcbGenericContextBehavior`.

Fixes #67704.

(cherry picked from commit 9769560da7)
2026-03-17 12:21:31 -07:00
Angular Robot ca328eab8f docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-03-16 14:47:18 -06:00
Andrew Scott faeeef678a feat(dev-infra): add PR review agent skill
This commit introduces an AI agent skill for reviewing pull requests
against the Angular repository. It establishes guidelines for ensuring
code cleanliness, performance, testing, API design, and payload size.

It supports performing reviews through both the GitHub CLI (remote) and
local editing, factoring in package-specific guidelines (e.g., router)
and prioritizing user approval before posting comments. By checking existing
comments first, the agent can avoid duplicate reviews.

This provides the AI agent with a reproducible workflow for providing
constructive, manual PR feedback.

(cherry picked from commit 2e34924647)
2026-03-16 13:25:51 -07:00
Angular Robot 4d786517d3 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-16 10:54:17 -06:00
Kristiyan Kostadinov 26c43d14ba fix(compiler-cli): escape template literal in TCB
Fixes a regression introduced by #67381 where we weren't escaping backticks in template literals.

Fixes #67675.

(cherry picked from commit 2bd708fb6b)
2026-03-16 09:47:29 -07:00
Max Millien 1890c3008b fix(core): clean up dehydrated views during HMR component replacement
During HMR, `recreateLView()` destroys the old LView and removes its
DOM nodes, but never cleans up dehydrated view DOM nodes stored in
`LContainer[DEHYDRATED_VIEWS]`. These are SSR-rendered DOM nodes
preserved by Angular's hydration system. When the new view renders,
both the old dehydrated DOM and the new DOM coexist, causing visible
duplication (e.g. `<app-shell>` header/footer appearing twice).

Call `cleanupLView` from the hydration cleanup module after
`destroyLView` and before `removeViewFromDOM` to remove any remaining
dehydrated DOM nodes before the replacement view is rendered.

Fixes #66503

(cherry picked from commit dc0446552a)
2026-03-16 09:04:11 -07:00
hawkgs cbb2266984 test(devtools): fix and update flaky component-tree tests
Due to the design of the `ng.getComponent` spy and a race condition where sometimes a `<script>` is added to the test DOM, the `getRootElements` tests used to fail sometimes because those `<script>`s were marked as roots which caused a distortion in the roots count checks. The commit addresses that and also adds an additional test for non-application root Angular components.

(cherry picked from commit 77d7378ffd)
2026-03-16 09:03:47 -07:00
SkyZeroZx ea4847aae5 docs(docs-infra): add spacing between reference option and description
Add a spacing class to `docs-reference-option` to prevent the text from appearing too close together.

(cherry picked from commit 3720b2de0f)
2026-03-16 09:00:50 -07:00
Akash Patel 5fa3052ed1 docs: update uninstallation commands for Karma packages
Added 'jasmine-core' to the list of packages to uninstall when migrating to Vitest.

(cherry picked from commit b9ff865b49)
2026-03-16 08:59:38 -07:00
SkyZeroZx 86718fbbe1 docs: fix type code block language
fix type code block language

(cherry picked from commit acd6f690bd)
2026-03-16 08:59:13 -07:00
guidettj de5fbb7deb docs: use lighter lodash isEqual import in equality example
(cherry picked from commit 7d483f28a4)
2026-03-16 08:58:44 -07:00
Angular Robot f39896da99 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-13 16:25:45 -06:00
ibrahim-hussien-dev 21cab20dae docs: combine multiple documentation typo fixes
(cherry picked from commit e127927807)
2026-03-13 12:10:59 -07:00
Angular Robot 2d28e9b392 build: update pnpm to v10.32.1
See associated pull request for more information.
2026-03-13 13:08:54 -06:00
Alan Agius 5b46a63c08 build: update rules_angular dependency commit hash
Update rules_angular to latest sha
2026-03-13 13:07:06 -06:00
Alan Agius 03fb3cd463 refactor: ensure modules with 'declare global' are correctly handled by Rollup
Explicitly adding an `export {}` to modules containing declare global fixes an issue where Rollup would incorrectly claim that the global variable is not defined in the emitted .d.ts files.

Needed to land the latest rules_angular.
2026-03-13 13:07:06 -06:00
SkyZeroZx 67a73192bf docs(docs-infra): remove tap highlight for API reference list filter
Prevents the default translucent highlight from appearing on touch devices when interacting with the API reference list filter.

(cherry picked from commit 7cd474d1d6)
2026-03-13 12:04:06 -07:00
Jessica Janiuk e5ed276f27 refactor(core): Ensure determineLongestAnimation is run synchronously after style applies
This adds a setTimeout, which guarantees that we call getAnimations one frame after a reflow is finished. This means getAnimations will return data, avoiding needing the expensive fallback of getComputedStyles. It also updates the cleanup to prevent a potential memory leak if the component is destroyed before the timeout runs.

(cherry picked from commit 318ade062e)
2026-03-13 12:03:15 -07:00
Kristiyan Kostadinov 334ae10168 fix(compiler): ensure generated code compiles
Initial pass to make sure some common cases produce code that compiles.
2026-03-13 12:53:47 -06:00
Kristiyan Kostadinov 1f2dc72e8a refactor(compiler-cli): update ast factories to account for type nodes
Updates the Babel and TypeScript AST factories to account to produce type nodes.
2026-03-13 12:53:47 -06:00
Kristiyan Kostadinov e3b0e5a0b3 refactor(compiler-cli): add type nodes to translator
Updates the translator and AST factories to account for type nodes.
2026-03-13 12:53:47 -06:00
Kristiyan Kostadinov 10b0dd94e9 refactor(compiler-cli): add generic for type nodes to AST factories
Updates the type factories and various usage sites to add a generic for type nodes.
2026-03-13 12:53:47 -06:00
Jessica Janiuk 6f41efc689 refactor(core): Update determineLongestAnimation to account for playback rate
This updates the determineLongestAnimation code to also calculate the playback rate in with the duration, which should also account for timing when testing with playback rates changed in devtools.

(cherry picked from commit 17d8a88ddc)
2026-03-12 16:36:54 -07:00
Kristiyan Kostadinov bfb8b177ac refactor(compiler-cli): remove more unused code
Cleans up some more usages of TS factory APIs and some unused functions.
2026-03-12 16:21:50 -06:00
Kristiyan Kostadinov 2feced366a refactor(compiler-cli): replace typescript usage in type reference emits
Replaces our usage of TypeScript APIs in several places that emit references to type nodes. Also deletes some unused code.
2026-03-12 16:21:50 -06:00
Alan Agius 5d755be01c refactor: ensure modules with 'declare global' are correctly handled by Rollup
Explicitly adding an `export {}` to modules containing `declare global` fixes an issue where Rollup would incorrectly claim that the `global` variable is not defined in the emitted `.d.ts` files.

Needed to land the latest `rules_angular`.

(cherry picked from commit bb628d8b50)
2026-03-12 13:58:03 -07:00
Matthew Beck 8017617fd9 release: cut the v21.2.4 release 2026-03-12 12:58:02 -06:00
Kristiyan Kostadinov ed2d324f9c fix(compiler): disallow translations of iframe src
Fixes that the compiler was allowing translations of `src` attributes in iframes which can be a security issue.

(cherry picked from commit 78dea55351)
2026-03-12 10:01:31 -07:00
Kristiyan Kostadinov d1dcd16c5b fix(core): sanitize translated form attributes
Fixes that we weren't sanitizing the `form` and `formaction` attributes when they're used together with translations.

(cherry picked from commit de0eb4c656)
2026-03-12 10:01:30 -07:00
Jessica Janiuk abbd8797bb fix(core): reverts "feat(core): add support for nested animations"
This reverts commit ea2016a6dc.

This reverts the support for nested animations due to the global scope of how nested animations were gathered.
This caused issues where on route navigations, all child nodes with animations would be queued and run before the navigation would occur.
We'll be revisiting the nested animations with a more tightened scope of when those leave animations will occur.

fixes: #67552
(cherry picked from commit 999c14eaab)
2026-03-12 09:58:07 -07:00
Angular Robot c06e3a0bb4 build: update bazel dependencies
See associated pull request for more information.
2026-03-11 14:41:33 -07:00
wokis 8ba2844da5 docs: document coverageExclude option for excluding files from coverage
(cherry picked from commit 3d25953e69)
2026-03-11 21:31:10 +00:00
Jon Snow 74698d58ec docs(forms): clarify zoneless change detection for reactive FormArray updates
Document that reactive forms model mutations such as FormArray.push() do not schedule component change detection in zoneless applications and show the recommended ways to notify Angular.

Fixes #65536

(cherry picked from commit 88235a0d12)
2026-03-11 14:13:27 -07:00
Andrew Scott a7e3d764e5 release: bump VSCode extension version to 21.2.3 (#67629) 2026-03-11 14:09:57 -07:00
Alan Agius 7907e982ee test: remove duplicate tests
These tests are duplicate and have been removed.
2026-03-11 13:35:26 -07:00
Alan Agius adda6c5c10 build: update aspect_rules_js to 3.0.2
This updates the major version of `aspect_rules_js`.
2026-03-11 13:35:26 -07:00
Andrew Scott e7593653be release: cut the v21.2.3 release 2026-03-11 12:03:13 -07:00
JoostK 21b1c3b2ee fix(core): include signal debug names in their toString() representation
The `toString()` implementations in the primitives package intended to include
the debug name, yet the debug name was evaluated during construction before it
could ever have been assigned. This commit fixes that.

The Angular wrappers override the `toString()` representation to evaluate signals
ad-hoc instead of showing their internal state, and this commit aligns their
behavior to include the debug name in `toString` as well.

(cherry picked from commit b401c18674)
2026-03-11 18:28:39 +00:00
SkyZeroZx 6c73aaca30 refactor(common): Removes unused generic type parameters from KeyValueDiffers
Remove unused generic type parameters from KeyValueDiffers methods

(cherry picked from commit 0837d25a70)
2026-03-11 17:49:15 +00:00
Matthieu Riegler c98eab794c refactor(core): remove old resource params
G3 has been cleaned up we can drop those.

(cherry picked from commit 4842f5a3b7)
2026-03-11 17:44:16 +00:00
Thomas Willberger d45fced21b docs: remove duplicate aria-hidden attribute in angular aria ngTree example
(cherry picked from commit eafce6ed09)
2026-03-11 17:03:13 +00:00
SkyZeroZx ed48c41f65 refactor(compiler-cli): simplifies IncrementalCompilation.fresh
Removes the `ts.Program` argument from the `IncrementalCompilation.fresh` method.

(cherry picked from commit 66e72efef4)
2026-03-11 16:41:05 +00:00
Ibrahim Hussien 75135586d6 docs: combine multiple documentation improvements into one PR
(cherry picked from commit 903d51e855)
2026-03-11 16:29:49 +00:00
Angular Robot ff697707ba build: update pnpm to v10.32.0
See associated pull request for more information.
2026-03-11 09:28:49 -07:00
SkyZeroZx 7d76103999 docs(docs-infra): fix close button clickability and prevent layout shift
Adjust the z-index to ensure the close button remains clickable.

Also remove an unnecessary `position: relative` that was causing
layout shifts in the docs UI, which resulted in a visible and
unintended layout movement.

(cherry picked from commit 3ce1d9a755)
2026-03-11 16:28:10 +00:00
Matthieu Riegler 575f3023c1 refactor(core): interface cleanup
Should be fine to land this time.

(cherry picked from commit a675950e44)
2026-03-10 19:44:36 +00:00
Andrew Scott 4c86ed382d refactor(compiler-cli): abstract type check block metadata to be AST-free
This commit refactors the template type checking metadata interfaces to use detached, serializable metadata rather than retaining direct references to ts.Node or ts.Declaration instances.

A new tcb_adapter translates traditional TypeScript AST-bound metadata into these decoupled structures. This abstraction lays the groundwork for supporting native preprocessors (such as Rust or ts-go) which serialize metadata over JSON rather than passing live TypeScript objects.

Key changes:
- Introduced TcbDirectiveMetadata, TcbComponentMetadata, TcbReferenceMetadata, and TcbPipeMetadata to replace TypeCheckableDirectiveMeta where appropriate.
- Substituted deep TS compilation AST references with string module names and source spans to preserve out-of-band diagnostic capabilities.
- Detached generic typeParameters and transformType properties into synthesized, standalone TS mappings.
- Updated generateTypeCheckBlock and corresponding Operations to consume the new metadata.
2026-03-10 12:39:18 -07:00
Kristiyan Kostadinov 224e60ecb1 fix(core): sanitize translated attribute bindings with interpolations
Fixes that we weren't sanitizing attribute bindings with interpolations if they're marked for translation, for example: `<a href="{{evilLink}}" i18n-href></a>`.

Also adds a bit more test coverage for our sanitization.

(cherry picked from commit 8630319f74)
2026-03-10 18:13:54 +00:00
Kristiyan Kostadinov 492e7560e6 build: include localize in dev app
Includes `$localize` in the dev app so it's easier to test some code paths.

(cherry picked from commit f80ac30875)
2026-03-10 18:13:53 +00:00
Jon Snow 09638ec7c3 docs(core): clarify provideZoneChangeDetection usage in v21+
Clarify that provideZoneChangeDetection() is used to opt applications into NgZone/ZoneJS-based change detection and to configure NgZone options such as eventCoalescing.

Fixes #67498

(cherry picked from commit 196933863b)
2026-03-10 17:21:13 +00:00
Guseyn ab35383285 docs: fix first-app code getHousingLocationById housing.service.ts
1. Get location by Id work with `${this.url}/${id}`
2. Method getHousingLocationById returned empty object, api return object type, locationJson[0] ?? {} - give in result empty object.

(cherry picked from commit 9794e756f9)
2026-03-10 17:02:43 +00:00
Angular Robot 934e2732b3 build: lock file maintenance
See associated pull request for more information.
2026-03-10 09:59:30 -07:00
Guseyn c20dabda2a docs: fix first-app 13 step docs code row numbers
Fix docs code row numbers.

(cherry picked from commit 7bc7c57636)
2026-03-10 16:59:08 +00:00
Kristiyan Kostadinov 62a97f7e4b fix(core): ensure definitions compile
Includes the following changes to make sure the definitions for injectable compiler:
1. The types for the `factory` function now include the `parent` parameter.
2. `ɵɵFactoryDeclaration` is now defined as a function. We need this since the provider definition gets passed into the inejctable definition by reference.
3. `ɵɵdefineInjectable`, `ɵɵdefineNgModule` and `ɵɵdefinePipe` now return the typed definition, rather than `unknown`. This aligns with what we do for components and directives.

(cherry picked from commit f9ede9ec98)
2026-03-10 16:58:22 +00:00
Eugene Serkin 106cf4ee90 docs: Update migration docs for vitest
This update fixes minor grammar mistakes

(cherry picked from commit 20496988b1)
2026-03-10 16:23:53 +00:00
Angular Robot 024e307ab0 build: update pnpm to v10.31.0
See associated pull request for more information.
2026-03-09 17:00:10 -07:00
SkyZeroZx 77b035eca6 docs: Adds @see links and update defer reference
(cherry picked from commit 6073493c5b)
2026-03-09 23:59:43 +00:00
Sonu Kapoor 4a9b715b3a test(forms): cover transformedValue without FormField context
Adds a test verifying that `transformedValue` exposes parse errors via
the returned signal's `parseErrors()` property when no FormField
context is present.

This ensures that:
- parse errors are still observable without DI-based field propagation
- the model is not updated when `parse` omits `value`
- valid input clears parse errors and updates the model

This test protects the documented contract that DI-based error
propagation is expected for FormValueControl usage, while standalone
usage relies on explicit consumption of `parseErrors()`.

(cherry picked from commit 71b8159b37)
2026-03-09 23:41:52 +00:00
Jessica Janiuk 420aa725ae docs: Update animation docs for element removal order
This update the docs to be clear that descendent node animations will happen before the parent node is removed.

fixes: #67526
(cherry picked from commit 8c17721333)
2026-03-09 23:40:48 +00:00
Matthieu Riegler c499c578c9 ci: fix exclusion of manual_api_docs
On top of #67253, dev-infra should be required for docs files

(cherry picked from commit bf93ff83d8)
2026-03-09 23:27:47 +00:00
Matthieu Riegler 0588133210 refactor(core): remove private export of getDebugNode
This is a public api

(cherry picked from commit 0afe3c00ae)
2026-03-09 18:21:23 +00:00
Andrew Scott 6416a31c1b refactor(core): update componentDeclaration to include isSignal
This is in DirectiveDeclaration and in the golden files with ComponentDeclaration
so I assume it was an accidental omission.

(cherry picked from commit e97f5139ec)
2026-03-09 18:17:42 +00:00
Andrew Scott b2b903957a release: cut the v21.2.2 release 2026-03-09 11:11:43 -07:00
Matthieu Riegler bd72571583 refactor(devtools): prevent spamming the message bus
This commit adds some state on the bus to prevent sending unecessary messages to the main window.

(cherry picked from commit 263b819a75)
2026-03-09 10:46:08 -07:00
Kam 628f3f99db docs: add Turkish community translation of Angular documentation
add a link to the community-driven Turkish translation of Angular
documentation to make it easier for Turkish-speaking developers to
discover localized docs.

The translation project is maintained by the community and hosted at:
https://github.com/erkamyaman/angular-tr

Providing documentation in developers' native languages helps lower
the barrier to entry and supports wider Angular adoption in the
Turkish-speaking developer community.

(cherry picked from commit 03465360bd)
2026-03-09 10:29:25 -07:00
hawkgs 79ac570c26 refactor(devtools): fix browser-specific styles infra
Fix browser-specific styles infrastructure. PR #62786 cleans up part of the code, but there are still services that attempt to load these stylesheets on `main`.

(cherry picked from commit ed3dc10fea)
2026-03-09 10:22:02 -07:00
Angular Robot 276c12a349 build: update dependency node to v22.22.1
See associated pull request for more information.
2026-03-06 15:32:15 -08:00
Angular Robot 104ac117ea docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-03-06 15:04:42 -08:00
Angular Robot c2a74548d9 build: update all github actions
See associated pull request for more information.
2026-03-06 14:36:16 -08:00
Kristiyan Kostadinov e7d1d8def3 refactor(core): add tracing for component creation
Adds tracing support for component creations.

(cherry picked from commit c19066c741)
2026-03-06 17:48:27 +00:00
Kristiyan Kostadinov 4a390b6c73 refactor(core): track the tracing service in the LView environment
Adds the `TracingService` to the `LView[ENVIRONMENT]` so we don't have to inject it everywhere.

(cherry picked from commit e433ba9a80)
2026-03-06 17:48:27 +00:00
Anushka Geeta Singh 5a486a65cf docs(router): Add example of relative navigation and multiple array values
Adds an example to docs with relative navigation and multiple values in
the commands array.

(cherry picked from commit 418cb61f2f)
2026-03-06 17:47:44 +00:00
Kristiyan Kostadinov c822bf8e76 fix(compiler-cli): always parenthesize object literals in TCB
This is a follow-up to #67381 which introduced a subtle bug where depending on the type checking configuration, we may put an object literal directly in the TCB body which the TS compiler ends up interpreting as a block. These changes resolve the issue by always wrapping the literal in parentheses.
2026-03-05 14:12:25 -08:00
Kristiyan Kostadinov 31e2c99007 refactor(compiler-cli): resolve presubmit issues
Resolves issues caught during the presubmit.
2026-03-05 14:12:25 -08:00
Kristiyan Kostadinov f8b6bd0cbe refactor(compiler-cli): escape quotes used in string expressions
TypeScript has functionality that automatically escapes quotes in string literals. These changes update the places where we may need to do the same ourselves.
2026-03-05 14:12:25 -08:00
Kristiyan Kostadinov 5349b027b8 refactor(compiler-cli): delete unused utilities
Deletes utilities that we no longer use.
2026-03-05 14:12:25 -08:00
Kristiyan Kostadinov 8f8d67dc57 refactor(compiler-cli): initial decoupling from TypeScript factory APIs
Initial pass to move usages of TS `factory` APIs to the new `TcbExpr`.
2026-03-05 14:12:25 -08:00
Kristiyan Kostadinov 23153a06dd refactor(compiler-cli): introduce new primitive for generating TCB code
Introduces the `TcbExpr` class that will be used to generate TCB code without going through TypeScript's factory APIs.
2026-03-05 14:12:25 -08:00
Alan Agius fd3b4413f3 docs: add a new section on nonces and caching considerations to the security guide.
(cherry picked from commit e5f99edda5)
2026-03-05 18:03:35 +00:00
Leon Senft 670d1660c4 feat(forms): add 'blur' option to debounce rule
Expands the `debounce` rule configuration to accept `'blur'`. When this option
is provided, the rule will delay model synchronization until the field loses
focus (is touched). This introduces a debouncer that defers resolution
until the framework automatically aborts pending debounces upon touch events.

(cherry picked from commit c767d678cf)
2026-03-05 17:55:18 +00:00
Angular Robot 8ca0237d99 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-04 16:27:39 -08:00
Joey Perrott 3576019c0f build: no longer require release mode for releases
This commit updates the github.mjs configuration to set requireReleaseModeForRelease to false, removing the requirement to use release mode for releases in the angular/angular repository.

(cherry picked from commit a6941adce8)
2026-03-04 22:48:59 +00:00
Doug Parker 05d022d5e6 fix(compiler-cli): ignore generated ngDevMode signal branch for code coverage
The Angular compiler unconditionally adds a debug name transform for signals
which generates a conditional on `ngDevMode` (e.g., `ngDevMode ? { debugName: "xyz" } : []`).
During testing, `ngDevMode` is true, so the true branch executes but the
false branch is never executed. Consequently, coverage tools report the
false branch as an untested line/branch, preventing 100% test coverage.

This commit adds a synthetic `/* istanbul ignore next */` comment to the
generated false branch so that Istanbul ignores it. We only include the
istanbul comment (instead of additionally including c8) to focus on the
established standard for Angular CLI/Karma coverage while maintaining
compatibility with modern Vitest setups, since @vitest/coverage-v8 now
natively respects the fallback istanbul comment.

Fixes #64583

(cherry picked from commit dc4cf649b6)
2026-03-04 22:42:57 +00:00
Andrew Scott 1df1697c6e fix(compiler): prevent mutation of children array in RecursiveVisitor
RecursiveVisitor.visitIfBlockBranch was permanently mutating the children array by pushing the expressionAlias into it. This change clones the array before pushing to avoid this side effect.

(cherry picked from commit 72a17afaf3)
2026-03-04 22:41:36 +00:00
Andrew Scott 05476ea21b release: bump VSCode extension version to 21.2.2 (#67449) 2026-03-04 12:40:40 -08:00
Jessica Janiuk f38169d0a7 release: cut the v21.2.1 release 2026-03-04 11:34:05 -08:00
Jessica Janiuk 6d7446bc6c refactor(core): account for shadow roots in animations
This adds a util function to get the proper target, properly accounting for shadow roots.

(cherry picked from commit fda08b7a89)
2026-03-04 18:16:43 +00:00
SkyZeroZx c25c84d7dc docs: add customization options for browser URL in routing guide
(cherry picked from commit 9208421290)
2026-03-04 18:10:29 +00:00
Angular Robot f4160c2073 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-04 10:01:57 -08:00
Jessica Janiuk 93c6dc6395 Revert "refactor(http): Improves base64 encoding/decoding with feature detection (#67002)"
This reverts commit aafeb1d2bd.

(cherry picked from commit 5338b5912c)
2026-03-04 17:19:14 +00:00
Jessica Janiuk 76431ed3e3 Revert "fix(http): correctly cache blob responses in transfer cache (#67002)"
This reverts commit 1f057afaac.

(cherry picked from commit 7eb33713b9)
2026-03-04 17:19:14 +00:00
Jessica Janiuk b4ec3cc4e4 fix(core): prevent child animation elements from being orphaned
When routing between two different routes, child animations were not finishing, causing elements to be left behind in the dom. The fix ensures the proper fallback is handled to avoid automatically cancelled custom events. This ensures the animation-fallback cancelling the animation actually completes, and ensures the element is removed.

fixes: #67400
(cherry picked from commit 9e64147b73)
2026-03-04 16:21:41 +00:00
Angular Robot 84e79f5add build: update pnpm to v10.30.3
See associated pull request for more information.
2026-03-04 08:03:41 -08:00
SkyZeroZx 2eecf0d9a2 docs: add documentation for dynamic validation schemas
(cherry picked from commit 9fa36d1a71)
2026-03-04 16:01:36 +00:00
Kristiyan Kostadinov da57d1af73 build: use TypeScript 5.9 for patch builds
Partially rolls back to using TypeScript 5.9 for the builds on the patch branch, because we bundle our TypeScript version with the language service which can introduce unexpected breakages for users.

Note that we still allow users to install TypeScript 6.
2026-03-04 07:59:23 -08:00
Georgi Serev 58ea4d2ee8 docs(docs-infra): add Azerbaijani community translation
Add https://angular.az (Azerbaijani) to the community translations section.

(cherry picked from commit e8676b5412)
2026-03-04 15:58:23 +00:00
SkyZeroZx 277ade97ac fix(http): correctly cache blob responses in transfer cache (#67002)
Previously, Blob values were passed to `Uint8Array` this resulted in silently producing an empty array (length = 0) without throwing an error, leading to empty cached data

PR Close #67002
2026-03-04 15:56:59 +00:00
SkyZeroZx aeb9b819d2 refactor(http): Improves base64 encoding/decoding with feature detection (#67002)
Use feature detection for `Uint8Array.prototype.toBase64` and
`Uint8Array.fromBase64`, falling back to the existing implementation
when native support is not available

PR Close #67002
2026-03-04 15:56:59 +00:00
Angular Robot 657d532ad1 build: update dependency preact-render-to-string to v6.6.6
See associated pull request for more information.
2026-03-03 14:48:18 -08:00
Angular Robot 8dafd2413a build: update dependency aspect_rules_jasmine to v2.0.4
See associated pull request for more information.
2026-03-03 14:46:02 -08:00
Angular Robot 796b9a714a build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-03 14:22:51 -08:00
Krueger01 dd551b1ff3 refactor(compiler-cli): update old angular.io references to angular.dev
Update comment references from the old site angular.io to the new site
angular.dev.

(cherry picked from commit 0e9d58ef09)
2026-03-03 22:22:23 +00:00
Andrew Scott 84adb2fb3b refactor(router): Permit deferring commit of traversal navigations
This updates the state manager to allow intercepting and deferring commits of traversal navigations.
The issues that were encountered in the past appear to be resolved in Chrome.
The behavior of redirect is still undefined in this case, so there is an added TODO.

(cherry picked from commit 778b748694)
2026-03-03 22:09:15 +00:00
Angular Robot 98343ea35e build: update cross-repo angular dependencies to b1b4bd0
See associated pull request for more information.
2026-03-03 10:36:54 -08:00
Angular Robot c4226a10d0 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-03 09:54:56 -08:00
Sai Kumar Kola 5e545069ac docs: fix side navigation bar foreground colors in both dark and light modes #67379
(cherry picked from commit 46c996a977)
2026-03-03 17:13:11 +00:00
SkyZeroZx ecf0bb4668 test(http): refactors HTTP client tests to use TestBed and providers
Updates HTTP client, JSONP, and XSRF tests to utilize `TestBed` for setup.

(cherry picked from commit ead6bb1f52)
2026-03-03 17:12:39 +00:00
Ben Hong 0d54c5f0e2 docs: modernize testing service guide
(cherry picked from commit 5955738bc4)
2026-03-03 17:12:03 +00:00
Angular Robot 8f6ca1d9f9 build: lock file maintenance
See associated pull request for more information.
2026-03-03 09:08:50 -08:00
Angular Robot 1f51c61372 build: update cross-repo angular dependencies to 2648276
See associated pull request for more information.
2026-03-02 12:22:46 -08:00
Jessica Janiuk f5e9a862c2 refactor(core): ignore infinite animations in animate api
This ensures that when calculating longest animations, we completely ignore infinite animations. This will prevent mistakes with using the API and hopefully catch any unexpected bugs.

fixes: #67350
(cherry picked from commit 9758ea9ee9)
2026-03-02 19:40:19 +00:00
Angular Robot 0c8a2858b9 build: update cross-repo angular dependencies to v21.2.0
See associated pull request for more information.
2026-03-02 11:32:52 -08:00
Matthieu Riegler a79e8afbad docs: update doc for provideZoneChangeDetection
fixes #67209

(cherry picked from commit a2d5048ff3)
2026-03-02 19:02:34 +00:00
SkyZeroZx 7b7faef739 docs: fixed note on event replay
(cherry picked from commit d793ee0bb7)
2026-03-02 18:59:21 +00:00
Joey Perrott 95afc09206 ci: update the path to the labeling github actions
Update the paths to the labeling github actions after the refactor in dev-infra

(cherry picked from commit 787db90e08)
2026-03-02 18:55:57 +00:00
kirjs 23cb9a4291 refactor(forms): address feedback
Refactor the normalizeFormArgs utility to include the internal FieldAdapter

(cherry picked from commit d2e33e86b9)
2026-03-02 16:46:47 +00:00
kirjs 0a863ba03f refactor(forms): hide adapter in public options
Moves adapter to internal options to prevent exposure but keep compatibility.

(cherry picked from commit 985d828f12)
2026-03-02 16:46:47 +00:00
Jessica Janiuk e923d88398 fix(core): Prevent removal of elements during drag and drop
This addresses a reported issue where elements were being fully removed from the DOM during drag and drop operations.

fixes: #67257
(cherry picked from commit 0b59cba85d)
2026-03-02 16:46:13 +00:00
Angular Robot 150f0b3c30 build: update cross-repo angular dependencies to 90e509f
See associated pull request for more information.
2026-03-02 08:42:55 -08:00
Angular Robot fc5f9d03cf build: update pnpm to v10.30.3
See associated pull request for more information.
2026-03-02 08:37:49 -08:00
Angular Robot 498d9cdda4 build: update cross-repo angular dependencies to 9cc4778
See associated pull request for more information.
2026-02-27 09:11:11 -08:00
Angular Robot fd8d29a157 build: update dependency bazel to v8.6.0
See associated pull request for more information.
2026-02-27 09:10:15 -08:00
Jessica Janiuk e2e9a9a531 fix(core): adds transfer cache to httpResource to fix hydration
This should prevent the microtask problem with hydration and httpResource.

fixes: #62897
(cherry picked from commit 88685cb3b6)
2026-02-27 17:09:26 +00:00
Matthieu Riegler 35fd8b567a build: use different default port for dev-app
Same as ADEV, currently the CLI prompts for another port if 4200 is busy but the toolchain doesn't support prompts.

By defaulting to 4201 we avoid regular CLI apps from preventing to run the dev-app

(cherry picked from commit 9bb4f02bef)
2026-02-27 17:04:19 +00:00
Angular Robot 4e9648d184 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-26 14:32:59 -08:00
Angular Robot 54a0541013 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-26 13:42:33 -08:00
Joey Perrott 9c0587f755 build: update to latest sha of dev-infra repo
Update to the latest sha of the dev-infra repo

(cherry picked from commit d1ebbbe9bc)
2026-02-26 20:42:17 +00:00
Joey Perrott ac06941bcf build: update to latest sha of dev-infra repo
Update to the latest sha of the dev-infra repo

(cherry picked from commit 385b9485c4)
2026-02-26 20:22:25 +00:00
Joey Perrott 907415c801 ci: set up automated issue labeling
Sets up automated issue labeling action

(cherry picked from commit 37b4d16357)
2026-02-26 20:22:25 +00:00
Angular Robot 225a56677e build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-26 10:40:54 -08:00
Joey Perrott 944181869d ci: set up linting for upcoming agent skills
Add validation/linting on CI for agent skills files

(cherry picked from commit 078da3cbda)
2026-02-26 18:04:30 +00:00
Joey Perrott 3d3e6cbf20 build: update repository locations for bazel rules
The repositories for `rules_sass`, `rules_angular`, and `rules_browsers`
were recently transferred from devversion to the angular organization.
This commit updates the internal bazel module rules to rely on
the new repository locations.

(cherry picked from commit b4f68acaa1)
2026-02-26 17:57:15 +00:00
Angular Robot 2158bf8bb8 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-26 09:44:02 -08:00
Matthieu Riegler 1b46b6db18 docs: add info around route level services
fixes #67313

(cherry picked from commit 95f12c87aa)
2026-02-26 16:20:02 +00:00
Matthieu Riegler f23f3e7f5f docs: add mention of identity tracking for field iterations
related to #66711

(cherry picked from commit 7d92d4454b)
2026-02-26 15:52:58 +00:00
Angular Robot 9414da5b7e build: update all github actions
See associated pull request for more information.
2026-02-26 07:50:54 -08:00
Angular Robot 8078abe893 build: update bazel dependencies
See associated pull request for more information.
2026-02-26 07:50:17 -08:00
Joey Perrott 661e800302 release: bump VSCode extension version to 21.2.1 2026-02-25 15:34:03 -08:00
Angular Robot c960a6e492 build: update cross-repo angular dependencies to v21.2.0
See associated pull request for more information.
2026-02-25 15:11:49 -08:00
Angular Robot 2eeb4b5666 build: update cross-repo angular dependencies to v21.2.0
See associated pull request for more information.
2026-02-25 12:47:33 -08:00
Hien 8f19cf8d84 docs(forms): fix casing of 'FormField' to 'formField' in templates
(cherry picked from commit de0cc817cd)
2026-02-25 20:46:06 +00:00
Jessica Janiuk 50a9ed190d release: cut the v21.2.0 release 2026-02-25 11:29:08 -08:00
Angular Robot e437980659 build: update cross-repo angular dependencies
See associated pull request for more information.

Closes #67275 as a pr takeover
2026-02-25 10:26:00 -08:00
Angular Robot d3ab1ea5f2 build: lock file maintenance
See associated pull request for more information.
2026-02-25 08:52:48 -08:00
Sonu Kapoor fe7b26e403 docs(forms): transformedValue parse error wiring
(cherry picked from commit 547ed65b6f)
2026-02-25 16:13:16 +00:00
SkyZeroZx 70e4c7fbab refactor(common): log a warning when a KeyValuePipe receives a signal
Add signal warning for `KeyValuePipe` and consolidates the `invalidPipeArgumentError` function into a `utils`

(cherry picked from commit 97ed3d9e85)
2026-02-25 16:11:34 +00:00
Angular Robot a25f74238e build: update jasmine dependencies to v6.1.0
See associated pull request for more information.
2026-02-25 07:57:47 -08:00
Angular Robot 61ad0f8b90 build: update pnpm to v10.30.2
See associated pull request for more information.
2026-02-25 07:54:45 -08:00
Matthieu Riegler a86c3214c2 ci: update pullapprove for manual_api docs
The markdown files shouldn't require dev-infra approval.

(cherry picked from commit 0cd00b91ef)
2026-02-24 23:23:34 +00:00
Anushka Geeta Singh 706cfecaee docs: update README to clarify app setup confirmation
Improved wording to clarify how beginners can verify their environment and IDE are correctly set up after running the app.

(cherry picked from commit bdbb7cc7af)
2026-02-24 22:22:32 +00:00
Angular Robot 63cb3f4fa8 build: update bazel dependencies
See associated pull request for more information.
2026-02-24 14:10:29 -08:00
Matthieu Riegler 787cd875b0 refactor(vscode-extension): Add support for exhaustive type check in the syntax
`@default never` will be considered a keyword on its own.

(cherry picked from commit db11e74b3d)
2026-02-24 19:23:50 +00:00
Matthieu Riegler 1a151f2dae docs: add docs for @switch Exhaustive type checking
(cherry picked from commit 9dc3ca44ec)
2026-02-24 18:53:47 +00:00
Munir Issa Said 6b112e6c6c docs: fix roadmap introduction text
(cherry picked from commit 035b151a17)
2026-02-24 18:52:38 +00:00
Doug Parker 7d58b798c6 fix(core): block creation of sensitive URI attributes from ICU messages
Translators are not allowed to write HTML which creates URI attributes. I opted to ban any values going into an attribute at all, to prevent even links to malicious content, rather than just sanitizing URIs.

I also converted this blocklist into an allowlist. Now, we only allowing setting known attributes (while sanitizing URI attributes). This significantly reduces risk of missing a vulnerable attribute and does not require an exhaustive list of all potential attributes.

BREAKING CHANGE: Angular now only applies known attributes from HTML in translated ICU content. Unknown attributes are dropped and not rendered.

(cherry picked from commit 306f367899)
2026-02-24 18:50:41 +00:00
Alan Agius ab1c84eed9 docs: consolidate validation rules for Host and X-Forwarded-Host headers into a single point.
(cherry picked from commit c57ba8c6e6)
2026-02-24 17:24:34 +00:00
Matthieu Riegler 103a44f690 docs: improve responsiveness of the homepage
This fixes some layout issues when on mobile.

(cherry picked from commit 9e0acc5930)
2026-02-24 17:23:43 +00:00
Shuaib Hasan Akib de9092eb23 docs: inline documentation and remove unused references
Replaces referenced doc blocks with inline documentation,
cleans up unused referenced code, and fixes broken list formatting

(cherry picked from commit 8739a22d28)
2026-02-24 17:22:54 +00:00
Jens Kuehlers 0b0b34565a docs: minor roadmap update (Ecosystem/vitest)
(cherry picked from commit dea858979e)
2026-02-24 17:22:13 +00:00
Angular Robot b17a7e062f build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-24 09:21:23 -08:00
Shuaib Hasan Akib 7c976c3453 docs: remove inconsistent padding in update page
Removes extra padding applied to the update page so its layout
matches the rest of the documentation where no padding exists
between the title and content.

(cherry picked from commit 15b51d0777)
2026-02-24 17:20:55 +00:00
SkyZeroZx eb6bce0ff5 docs: Add image loader config with height parameter
(cherry picked from commit c7dc7054dc)
2026-02-23 23:30:35 +00:00
Suguru Inatomi 30e486a41c fix(docs-infra): use shared heading ID generation logic
This commit extracts the heading ID generation logic into a shared utility
and updates both the route generation script and the markdown pipeline to use it.

This ensures consistency between the generated routes and the rendered
documentation, and fixes an issue where custom heading IDs (`{#id}`)
were ignored during route generation.

Fixes #67200

(cherry picked from commit bedfcb5644)
2026-02-23 23:16:55 +00:00
Matthieu Riegler a73d5435d8 docs: Add a compiler entry to the roadmap
(cherry picked from commit fbabd092f3)
2026-02-23 23:11:30 +00:00
marktechson b9d3fe3b44 docs: update and reformat the roadmap
(cherry picked from commit 53c1a1cee7)
2026-02-23 21:28:43 +00:00
Angular Robot c9ecf9e40b build: update cross-repo angular dependencies to v21.2.0-rc.1
See associated pull request for more information.
2026-02-23 13:17:58 -08:00
Shuaib Hasan Akib 2f213de593 refactor(core): remove outdated TODO comments
Cleans up TODO comments that are no longer planned

Fixes #67191

(cherry picked from commit 5ac1c025f9)
2026-02-23 18:19:57 +00:00
Matthieu Riegler ec32591dd7 docs: mention browser mode debugging
(cherry picked from commit a9ac7f87d7)
2026-02-23 18:19:27 +00:00
Miles Malerba 02b7f5e4f7 ci: remove mmalerba from reviewers
remove mmalerba from reviewers

(cherry picked from commit 0af9e3e9ee)
2026-02-23 18:19:02 +00:00
Angular Robot 31bf694599 build: update pnpm to v10.30.1
See associated pull request for more information.
2026-02-23 09:12:54 -08:00
Miles Malerba bdfb60f3e3 fix(forms): use consistent error format returned from parse
Aligns the errors returned from the `parse` function in
`transformedValue` to use the same convention as the rest of signal
forms (a property called `error` that can contain a single error or list
of errors)

(cherry picked from commit 23fd8fa586)
2026-02-23 17:11:55 +00:00
SkyZeroZx e99b92a1f0 docs: add Route Loading Strategies section and update navigation links
(cherry picked from commit 163dd8ee38)
2026-02-23 17:11:15 +00:00
Alan Agius 5c24de5ee8 docs: move server-side security and host validation documentation from ssr.md to security.md.
(cherry picked from commit 099b4a8bbb)
2026-02-23 17:08:56 +00:00
Alan Agius fad5def327 feat(docs-infra): add hideDollar option to hide the dollar sign prefix in shell code blocks.
The dollar sign is not always required.

(cherry picked from commit efcf76ea61)
2026-02-23 17:08:56 +00:00
Alan Agius de2eab6820 docs: convert SSR guide's important note list to HTML <ul> for proper rendering.
(cherry picked from commit 75fd6c0ff2)
2026-02-23 17:08:56 +00:00
Alan Agius ea1aeb3d45 docs: add documentation for SSR security and host validation, including details on allowedHosts configuration
This document adds more information about `allowedHost` option

(cherry picked from commit 944aefe854)
2026-02-23 17:08:55 +00:00
Jaime Burgos 35f0663ce8 refactor(core): guards stringify calls with ngDevMode
The `stringify` function is only needed for debugging purposes and
should not be called in production mode.

(cherry picked from commit c89d94bd58)
2026-02-20 21:24:31 +00:00
SkyZeroZx 2eeeabb760 fix(common): fix LCP image detection with duplicate URLs
Addresses an issue where the LCP image observer incorrectly identified LCP elements when the same image URL was used multiple times on a page

Fixes #53278

(cherry picked from commit 38749698d0)
2026-02-20 21:23:27 +00:00
Jessica Janiuk 87372893ea ci: update ng-dev config and pullapprove
This updates the pullapprove to remove the auto labeling of requires: TGP and instead moves it to the ng-dev config for pr updates.

(cherry picked from commit d7ddebca90)
2026-02-20 19:02:14 +00:00
cexbrayat 631f60d1f9 fix(forms): preserve parse errors when parse returns value
Fixes #67170 by keeping the errors even a value is returned from the parse function.

(cherry picked from commit fe25c57a5c)
2026-02-20 18:28:57 +00:00
Ben Hong 390efd51e7 docs: add new debugging and troubleshooting di guide
(cherry picked from commit 13e019a1bb)
2026-02-20 18:01:16 +00:00
splincode c2cedd1954 refactor(compiler-cli): improve diagnostic with help link
Add help link to extended template diagnostic messages to provide
users with additional guidance and documentation resources. This
enhancement improves developer experience by making it easier to
understand and resolve complex template issues through direct
access to relevant Angular documentation with detailed examples
and explanations for each diagnostic type.

(cherry picked from commit 66b472e2bc)
2026-02-20 17:40:21 +00:00
Matthieu Riegler 3c4deaa52b refactor(common): log a warning when a JsonPipe receives a signal
The JsonPipe does not unwrap signals and `JSON.stringify` will return `undefined` for signals.
To avoid confusion, we log a warning when a signal is passed to the pipe.

(cherry picked from commit 0d652ba4da)
2026-02-20 17:17:05 +00:00
Matthieu Riegler b5eea233df docs: improve signal demo example
(cherry picked from commit b7cf37d3e1)
2026-02-20 17:15:37 +00:00
SkyZeroZx c0cb6040f8 fix(compiler-cli): detect uninvoked functions in defer trigger expressions
Wrap `@defer` trigger expressions (`when`, `prefetch when`, `hydrate when`)
in a conditional context within the TCB to enable TypeScript's TS2774
diagnostic for detecting functions used without invocation.

Previously, signals and functions passed to `when` triggers without
parentheses would silently evaluate to truthy, causing unexpected behavior.
Now the compiler reports an error when a function is used as a condition
without being called.

(cherry picked from commit f90e5565e0)
2026-02-20 16:57:08 +00:00
Bas ten Feld fb901f7eda docs(docs-infra): fix typo 'requiredSync' instead of 'requireSync'
(cherry picked from commit 57edfaf435)
2026-02-20 16:53:24 +00:00
Matthieu Riegler 17da2c392e docs(docs-infra): remove toString from the API docs
(cherry picked from commit fc8140cff4)
2026-02-20 16:52:01 +00:00
Angular Robot 6cf0100fe4 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-19 18:12:11 -08:00
kbrilla d2137928e8 perf(language-service): use lightweight project warmup for Angular analysis
avoid per-file semantic diagnostics work when warming up a newly loaded project.
add ensureProjectAnalyzed() to the language-service API and use it from the server startup path.
implement warmup through public compiler API access with existing perf tracing, and add legacy test coverage for the new warmup flow.

(cherry picked from commit 39f62fa408)
2026-02-20 02:11:06 +00:00
Matthieu Riegler 1d4783c01c refactor(language-service): split tests to reduce risk of timeouts
Because we've had to many timeouts recently

(cherry picked from commit 550b3ba01b)
2026-02-20 02:10:34 +00:00
SkyZeroZx 9ee99c7cc0 docs: update NgTemplateOutlet documentation with injector
(cherry picked from commit 67b22d509a)
2026-02-20 00:06:29 +00:00
Angular Robot 5b8a403220 build: update rules_browsers digest to ceb5275
See associated pull request for more information.

Closes #67141 as a pr takeover
2026-02-19 16:01:02 -08:00
SkyZeroZx 9c8f2dab7d docs: add section on reactive context and async operations
(cherry picked from commit f68078b3e3)
2026-02-19 23:59:59 +00:00
SkyZeroZx 9f1a78ca74 docs(docs-infra): preserve content before docs-card-container in adev
The tokenizer regex pattern `[^<]*` was consuming all non-`<` content
before custom HTML tags, causing lost content.

Changed to `\s*` which only allows leading whitespace, letting marked
properly tokenize preceding content.

(cherry picked from commit bc473cf60f)
2026-02-19 23:48:49 +00:00
Angular Robot d45440eda4 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-19 13:31:08 -08:00
Matthieu Riegler eb7c593fda ci: add zone.js to minimumReleaseAgeExclude
This is a package we control the release of.

(cherry picked from commit d501506aa6)
2026-02-19 20:41:24 +00:00
Walter Breakell 48802fd7ed docs: fix grammar, syntax, and broken link in elements guide
(cherry picked from commit 7d21996b1e)
2026-02-19 20:39:04 +00:00
Joey Perrott 5cea3576cf docs: update changelog to note no changes in 21.1.5 release
(cherry picked from commit e8cc910965)
2026-02-19 19:23:48 +00:00
Angular Robot 913bb6ad14 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-19 11:22:42 -08:00
Angular Robot 79f1cd462e docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-02-19 09:03:46 -08:00
SkyZeroZx 4ea3cafdc8 docs(docs-infra): fixed missing gray color palette definitions for light and dark modes
Adds the missing gray color palette definitions for both light and dark modes

(cherry picked from commit 1771d54fb7)
2026-02-19 16:55:02 +00:00
Angular Robot 94b9a3ef70 build: update all github actions
See associated pull request for more information.
2026-02-19 08:52:00 -08:00
Angular Robot c5afb88d9a build: update cross-repo angular dependencies to v21.2.0-rc.0
See associated pull request for more information.
2026-02-19 08:51:02 -08:00
Andrew Scott f58f9c892e release: cut the zone.js-0.16.1 release
(cherry picked from commit ac8b5ff938)
2026-02-18 16:26:41 -08:00
Andrew Scott 7f33cbeb6c release: bump VSCode extension version to 21.2.0 (#67134) 2026-02-18 15:48:34 -08:00
Andrew Scott dd630ef955 build: update version target to prep for 21.2.0 release for vscode extension (#67132)
build: update version target to prep for 21.2.0 release for vscode extension
2026-02-18 15:14:45 -08:00
Matthew Beck 13fd2b1aa3 release: cut the v21.2.0-rc.0 release 2026-02-18 14:38:30 -08:00
Matthew Beck cb8e974de0 docs: release notes for the v21.1.5 release 2026-02-18 14:23:57 -08:00
Leon Senft 567f292e8e fix(forms): support custom controls as host directives
Add the missing code to update control properties when control is a host
directive.

Fix #66592.
2026-02-18 14:06:54 -08:00
Leon Senft dcb9af6dfa test(forms): [formField] synchronizes with a host directive
Test that `[formField]` synchronizes its value with a custom form
control implemented as a host directive on a component.
2026-02-18 14:06:54 -08:00
Ben Hong 9a9f4e7f93 docs: update best practice performances nav structure to be more comprehensive 2026-02-18 11:40:19 -08:00
Ben Hong b8811b45d8 docs: add signal forms async operations guide
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2026-02-18 11:03:55 -08:00
Doug Parker 47486f8c49 release: bump Angular DevTools version to 1.11.0 2026-02-18 10:47:56 -08:00
Andrew Scott c36385c691 refactor(docs-infra): Add writing guide skill
This adds a writing skill for writing and reviewing adev content
2026-02-18 09:28:21 -08:00
Angular Robot 22a209055c build: update pnpm to v10.30.0
See associated pull request for more information.
2026-02-18 09:07:03 -08:00
Angular Robot eaf72d456a build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-18 08:50:39 -08:00
SkyZeroZx 5a3cacaaac build: updates Bazel commands in ssr-benchmarks to use pnpm for consistency 2026-02-18 08:49:22 -08:00
Andrew Scott 98610aabaf docs(zone.js): update release and publish commands in DEVELOPER.md 2026-02-18 08:47:53 -08:00
Andrew Scott d99e336a03 docs(zone.js): update build command in DEVELOPER.md 2026-02-18 08:47:53 -08:00
Andrew Scott c2f7eaa833 docs(zone.js): update instructions to use pnpm 2026-02-18 08:47:53 -08:00
kirjs 680e1c05c6 docs: fix custom control metadata example in signal forms guide
It was incorretly assuming FieldState is passeed to formField input
2026-02-18 07:12:43 -08:00
SkyZeroZx fd956f675a refactor(forms): simplify destroy subject handling
Remove unnecessary conditional check when completing the destroy subject, since it is always defined
2026-02-18 07:12:02 -08:00
Matthieu Riegler bd1cdac54d docs(docs-infra): new homepage 2026-02-18 07:10:53 -08:00
aparziale 8de0d25ffa docs(docs-infra): Signal forms docs
Update docs signal forms errors input wrong typing

fixes #66844
2026-02-17 14:36:00 -08:00
Angular Robot 2931ca1fca build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-17 14:33:19 -08:00
SkyZeroZx 064749e010 docs: fix enableProfiling note 2026-02-17 13:34:27 -08:00
Leon Senft b481294047 refactor(forms): remove unused generic type parameter
The `TValue` type parameter was unused by `FormUiControl`.
2026-02-17 13:02:42 -08:00
SkyZeroZx e45a7fe734 refactor(compiler-cli): update updateImportClause away from deprecated signature
Updates the `updateImportClause` call to use the non-deprecated signature.
Also update test `new Buffer` to `Buffer.from`
2026-02-17 12:56:04 -08:00
Matthew Beck dea0819aa9 build: update cross-repo angular dependencies (main)
Takeover of https://github.com/angular/angular/pull/66795 that fixes
adev.

Closes #66795.
2026-02-17 12:40:20 -08:00
Angular Robot 084f7dc08d build: update cross-repo angular dependencies
See associated pull request for more information.

Closes #66795 as a pr takeover
2026-02-17 12:40:20 -08:00
Andrew Scott fc557f0276 fix(zone.js): support passthrough of Promise.try API
When Zone patches Promise, it uses ZoneAwarePromise. The new Promise.try API was undefined on ZoneAwarePromise, making it unavailable when zone was present. This change gracefully passes through Promise.try to the native Promise implementation, if available, without patching it to execute in the right zone (our stance is not to add new patches but avoid destructively making new APIs unavailable).

Fixes #67057
2026-02-17 11:32:49 -08:00
Matthieu Riegler 95b3f37d4a feat(compiler): Exhaustive checks for switch blocks
`@switch` blocks can now enable exhaustive typechecking by adding `@default(never);` at the end of a `@switch` block.
2026-02-17 10:25:31 -08:00
Rajveer a8aab64809 refactor(core): remove outdated TODO comments referencing TypeScript 2.1
Angular requires TypeScript >=5.9, making TODO comments that reference TypeScript 2.1 features obsolete. These comments existed in keyvalue_differs.ts and ng_for_of.ts and referenced type improvements that were deferred until TS 2.1, which has long since been surpassed.
2026-02-17 08:49:33 -08:00
Kristiyan Kostadinov 81cabc1477 feat(core): add support for TypeScript 6
Updates the project to support TypeScript 6 and accounts for some of the breakages.
2026-02-17 08:40:38 -08:00
hawkgs 9f4c025531 refactor(devtools): improve formatting of injector providers token labels
Use `InjectionToken.toString` for the string representation of `InjectionToken`s for better readibility.
2026-02-17 08:33:41 -08:00
Kristiyan Kostadinov 9c5658adb1 refactor(compiler): clean up pipeline compatibility distinction
Removes the switch for compatibility mode from the template pipeline since we never got around to removing it and at this point it causes a bunch of runtime errors.
2026-02-17 08:30:04 -08:00
aparziale b8d1164e0f docs: typo in documentation
Fix typo in documentation signal

Fixes #67090
2026-02-17 08:25:04 -08:00
Miles Malerba ee7b4eb24d docs: add testing tips to AGENTS.md
Add testing tips to AGENTS.md
2026-02-17 08:23:59 -08:00
Andrew Scott 815e1a03a9 refactor(compiler-cli): Add skeleton tests around source->source compiler transform mode
adds skeleton and tests for source->source compiler transform.
2026-02-13 16:48:13 -08:00
Casper Jacobsen a37b6c55a8 docs: fix formatting in pipes.md example
Example "without parentheses" still had parentheses
2026-02-13 15:42:37 -08:00
Miles Malerba a6a0347998 refactor(forms): extract common parser logic (#66917)
native controls and custom controls (via transformedValue) use similar
parsing logic but it needs to be hooked up differently. This commit
extracts the common bits into a shared piece.

PR Close #66917
2026-02-13 12:11:06 -08:00
Miles Malerba 30f0914754 feat(forms): support binding null to number input (#66917)
Supports binding `null` to a `<input type=number>`.

- Binding in `null` clears the input
- Binding in `NaN` also clears the input
- When the user clears the input, the model is set to `null`
- The model is _never_ set to `NaN` based on user interaction. It is
  either set to `null` if the user cleared the input, or is unchanged
  and a parse error added if the user entered an invalid number like
  "42e"

PR Close #66917
2026-02-13 12:11:06 -08:00
Miles Malerba 22afbb2f36 feat(forms): add parsing support to native inputs (#66917)
Integrates native inputs with the new parseErrors API so that they can
report parse errors when the user types an un-parsable value (e.g. "42e"
in a number field).

When a user types an un-parsable value, the model does not update. It
retains its previous value and a parse error is added for the control
that received the un-parsable value.

PR Close #66917
2026-02-13 12:11:06 -08:00
Miles Malerba 27397b3f4f fix(forms): clear parse errors when model updates (#66917)
Changes `parsedErrors` to a `linkedSignal` based on the model value.
This ensures that the parse errors are reset if the model changes from
outside the control.

PR Close #66917
2026-02-13 12:11:06 -08:00
Cameron Smick 2d9987869b refactor(devtools): Add a new childSignalProp DebugSignalGraphNode kind to represent a signal being passed to a child component as a prop.
The purpose for this change is to add nodes to the signal graph to make it clear when producer nodes, especially those that aren't consumed in the component being inspected, are passed to child components for consumption.
2026-02-13 10:09:59 -08:00
marktechson 29a17ed791 docs: Adds new agent skills to Angular
The first agent skill is a workflow for building a new Angular app from scratch. Using this skill agents will use Angular tooling for code generation where appropriate. Also includes important hints.
2026-02-13 10:07:54 -08:00
SkyZeroZx e10a63453d refactor(compiler-cli): use phaseModifier for type-only import detection
The `isTypeOnly` property was deprecated in TypeScript and replaced by `phaseModifier`.

Updates the check to use `phaseModifier`, which is the recommended API for detecting type-only imports.

Additionally, removes the unused `metadata` parameter from the `NgModuleExtractor`
2026-02-13 09:42:48 -08:00
Matthieu Riegler 5f6088da3a refactor(language-service): split tests into multiple targets
The helps with fighting flakiness
2026-02-13 09:42:05 -08:00
Matthieu Riegler 6e0d783e5b refactor(compiler): Add info about unclosed element.
We chose to throw 2 errors here because we can't assume the intention of the developer and the span we target are different.

fixes #57032
2026-02-13 09:41:37 -08:00
Matthieu Riegler 08ea105aa3 refactor(platform-server): split zone/zoneless tests.
The Zone tests are a subset of tests that we still using the Zone CD provider.
2026-02-13 09:41:10 -08:00
cexbrayat 63d8005703 fix(forms): preserve custom-control focus context in signal forms
Fixes #67051

Store custom control focus callbacks in a wrapper so method invocation keeps the original object context. Without this, custom focus methods that access instance members throw at runtime when focusBoundControl() is called.
2026-02-13 09:37:19 -08:00
Matt Lewis 0806ee3826 fix(core): prevent animated element duplication with dynamic components in zoneless mode
When using ViewContainerRef to rapidly toggle animated elements in
zoneless mode (e.g. CDK Overlay menus), multiple copies of the element
could appear in the DOM. This happened because leave animations were
queued but not yet executed, and the existing `cancelLeavingNodes`
mechanism could not find the leaving element to cancel it — it ran
during template execution before the new element was in the DOM, and
used the declaration container's anchor which doesn't work for
overlay/portal patterns where elements are moved to separate
containers.
2026-02-13 09:35:08 -08:00
hawkgs 83da928206 fix(devtools): injector tree errors when inspecting null nodes
Due to explicit injector type checks, inspecting nodes that have type !== `environment` but at the same time are rendered in the Environment Injector tree, opening their details used to break the app. This change fixes this.
2026-02-13 09:33:37 -08:00
Angular Robot dfd5e3a90a build: update pnpm to v10.29.3
See associated pull request for more information.
2026-02-13 09:18:58 -08:00
Angular Robot d0038235d5 build: update bazel dependencies
See associated pull request for more information.
2026-02-13 09:18:32 -08:00
Jef 3cad0d644e docs: Clarify sentence in attribute-directives.md 2026-02-13 09:16:45 -08:00
Matthieu Riegler d5b35b1826 refactor(core): place Eager value first
This way the jsdoc wouldn't collapse if/when we remove the `Default` value.
2026-02-12 17:29:30 -08:00
SkyZeroZx ddfc833df9 refactor(common): improve image directive typings
Add image directive typings to improve type safety and removes an unused parameter from the observer registration.
2026-02-12 16:51:51 -08:00
Angular Robot 5b59dbd36f build: lock file maintenance
See associated pull request for more information.
2026-02-12 10:18:03 -08:00
Matthew Beck 06d94ac0ca Revert "refactor(compiler): Add info about unclosed element."
This reverts commit 097208454b.
2026-02-12 09:30:57 -08:00
Matthieu Riegler 097208454b refactor(compiler): Add info about unclosed element.
We chose to throw 2 errors here because we can't assume the intention of the developer and the span we target are different.

fixes #57032
2026-02-12 08:55:20 -08:00
Matthew Beck b386f95bd0 Revert "refactor(compiler): Add info about unclosed element."
This reverts commit 9b69e29603.
2026-02-12 08:54:40 -08:00
Matthieu Riegler 9b69e29603 refactor(compiler): Add info about unclosed element.
We chose to throw 2 errors here because we can't assume the intention of the developer and the span we target are different.

fixes #57032
2026-02-12 07:58:06 -08:00
Miles Malerba 62453330f5 build: add workspace rule for antigravity
Antigravity does not support AGENTS.md, instead it has "workspace rules" (antigravity.google/docs/rules-workflows). This commit adds a symlink for the workspace rule.
2026-02-11 15:23:05 -08:00
Miles Malerba d75046bc09 fix(forms): warn when showing hidden field state
In signal forms, it is up to the user to guard hidden fields from being
rendered in the template. To help catch instances where it is
accidentally not guarded, this commit introduces a warning in dev mode.
2026-02-11 14:46:43 -08:00
Matthieu Riegler 17f19272c1 refactor(core): replacing usages of Default strategy with Eager
This will allow us to remove the `Default` value in g3.
2026-02-11 14:40:49 -08:00
Matthieu Riegler 302ea2ee46 fix(devtools): scope the message bus with URLs to prevent cross message interference
This prevents us from having detectAngular from running indefinitely.
2026-02-11 14:38:33 -08:00
Georgi Serev ece827e269 feat(devtools): add dependencies highlighting to the signal graph
Add ability to highlight the upstream and downstream dependencies path via the node details.
2026-02-11 14:37:51 -08:00
Angular Robot f67818a0ea docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-02-11 14:09:58 -08:00
Jessica Janiuk 4937d162f5 ci: update pullapprove reviewer list
This cleans up the pullapprove reviewers.
2026-02-11 14:00:01 -08:00
Matthieu Riegler 7b5bcbf401 build: add node type for api extraction
Without this the node types are `any`.

fixes #67027
2026-02-11 13:57:58 -08:00
Angular Robot a4fceda35b build: update pnpm to v10.29.2
See associated pull request for more information.
2026-02-11 13:40:49 -08:00
Miles Malerba 50e74add52 build: add skills in antigravity
Adds a symlink `.agent/skills` to `.gemini/skills`. This will allow
antrigravity which searches under `.agent` to see them.
2026-02-11 13:39:52 -08:00
Charles Lyding 4999868d8d build: migrate integration tests to manual Protractor setup
Removes the use of the private Protractor builder (`@angular-devkit/build-angular:private-protractor`)
from all integration test projects. Projects that still require E2E tests
now invoke Protractor directly via NPM scripts using `concurrently` to
manage the development server.
2026-02-11 13:38:55 -08:00
Leon Senft 3606902b33 refactor(forms): relax [formField] input type from FieldTree to Field
`FieldTree` was an unnecessarily specific type for the `[formField]`
input. It forced the directive to care about what _kind_ of `FieldTree`
was bound–specifically whether it was Reactive Forms compatible or not.
This made it difficult to author forms system-agnostic components with
passthrough `[formField]` inputs.
2026-02-11 11:45:20 -08:00
Andrew Kushnir 39cff9c235 release: cut the v21.2.0-next.3 release 2026-02-11 09:58:38 -08:00
Andrew Kushnir ad815106dd docs: release notes for the v21.1.4 release 2026-02-11 09:51:23 -08:00
Miles Malerba ba009b6031 feat(forms): add form directive
Adds a `formRoot` directive to manage submitting the form in signal
forms.
2026-02-10 14:34:48 -08:00
Matt Lewis bd2868e915 fix(core): capture animation dependencies eagerly to avoid destroyed injector
Animation runner functions (runEnterAnimation, runLeaveAnimations,
runLeaveAnimationFunction) execute asynchronously from the animation
queue via afterNextRender. By that time the lView injector may have
been destroyed, causing lView[INJECTOR].get(NgZone) to throw NG0205.

Move the NgZone and MAX_ANIMATION_TIMEOUT lookups into the setup
instructions (ɵɵanimateEnter, ɵɵanimateLeave, ɵɵanimateLeaveListener)
which run synchronously during template processing when the injector
is guaranteed to be valid, and pass them through the closures.
2026-02-10 13:31:23 -08:00
Weddly Rodrigues c6ca1cd725 docs: rename loadUser mock API to getUserData 2026-02-10 13:30:44 -08:00
Matthieu Riegler e229328b39 test: add test about mapped attributes to input
The dynamic component has `[value]` in its selector and this has always been reflected as a DOM attribute on the dynamically created host element, which is now also synced into the component instance.

fixes #60157
2026-02-10 13:29:31 -08:00
Charles Lyding 8b4eec6683 docs: remove legacy e2e configuration from i18n example
Removes the unused 'e2e' configuration block using '@angular-devkit/build-angular:private-protractor' from the i18n example configuration.
2026-02-10 13:28:48 -08:00
Miles Malerba 18003a33bb feat(common): add an 'outlet' injector option for ngTemplateOutlet
Adds an option (`ngTemplateOutletInjector="outlet"`) that instructs the ngTemplateOutlet to inherit its injector from the outlet's place in the instantiated DOM.
2026-02-10 09:42:50 -08:00
Miles Malerba a7e8abbb7e fix(core): correctly handle SkipSelf when resolving from embedded view injector
The `SkipSelf` flag is intended for the current injection context. When delegating to an embedded view injector, we are traversing to a parent/fallback scope, so the 'Self' has already been skipped.
2026-02-10 09:42:50 -08:00
Matthieu Riegler 4f8d3995f0 fix(vscode-extension): Highlight function calls with optional chaining
eg: `foo?.()` should be highlighted as `foo()`.

fixes #65513
2026-02-10 09:42:03 -08:00
Charles Lyding 387793fe29 build: remove unused Protractor E2E target from legacy-animations
Removes the `e2e` architect target from the `legacy-animations` integration test
project as it does not have actual E2E tests and was using a placeholder script.
2026-02-10 09:41:26 -08:00
Charles Lyding 15fc190556 test: remove unused Protractor E2E targets from integration tests
Removes the `e2e` architect target from several integration test projects
that do not have Protractor as a dependency and are not executing E2E tests.

Affected projects:
- cli-hello-world
- cli-hello-world-lazy
- defer
- legacy-animations-async
- standalone-bootstrap
2026-02-10 09:41:26 -08:00
SkyZeroZx 0f47fda51b test(router): move timeout and autoTick helpers to shared testing utilities
Centralizes common test helpers under testing utilities and updates usages
2026-02-10 07:45:00 -08:00
SkyZeroZx 19d0ceede3 test(forms): move timeout and autoTick helpers to shared testing utilities
Centralizes common test helpers under testing utilities and updates usages
2026-02-10 07:45:00 -08:00
SkyZeroZx 0c6eb60c86 test(http): remove zone-based testing utilities
Removes usages of zone-based helpers as part of the migration to zoneless tests.

Completes the transition to zoneless.
2026-02-10 07:45:00 -08:00
SkyZeroZx 8b3b069be7 refactor(forms): use optional chaining for safer method calls in form directives
Simplifies null checks by leveraging optional chaining when invoking
optional callbacks
2026-02-10 07:42:56 -08:00
SkyZeroZx e7fa177923 refactor(compiler-cli): removes reflector parameter from wrapTypeReference
The `wrapTypeReference` function no longer needs the `reflector` because it only uses the `clazz` parameter to create a `WrappedNodeExpr`.
2026-02-10 07:42:25 -08:00
Matthieu Riegler 760910ecf1 Revert "refactor(service-worker): remove zone-based testing utilities"
This reverts commit 12b770d  (on top of the partial revert of #66978)
2026-02-09 15:52:26 -08:00
SkyZeroZx 51cc914807 feat(common): support height in ImageLoaderConfig and built-in loaders
Introduces an optional `height` property in `ImageLoaderConfig`, allowing
built-in image loaders to generate URLs with explicit height parameters.
This improves layout control and enables better support for loaders that
require height-based transformations.

Closes #51723
2026-02-09 14:51:04 -08:00
Miles Malerba f56bb07d83 feat(forms): add field param to submit action and onInvalid
The `action` and `onInvalid` handlers now recevie two pieces of
information:
1. The form that is being submitted
2. The specific field that the submit was triggered on

Remove the `submit()` method on field state - supporting this is complex
from a typing perspective, since the `FieldState` only knows its
`TValue` type, not the `TModel` type of its owning `FieldTree`. Rather
than try to pack additional generics on to `FieldState`, we'll just
leave the `submit` function as a standalone importable function.
2026-02-09 14:49:43 -08:00
Jaime Burgos c6d7500203 test(common): remove zone-based testing utilities
Removes usages of zone-based helpers such as `fakeAsync` , `tick`
`waitForAsync` as part of the migration to zoneless tests.

Completes the transition to zoneless.
2026-02-09 14:47:35 -08:00
Jessica Janiuk e53c8abaf9 fix(core): Fix flakey test due to document injection
This fixes the test issues with the transfer state by using the DOCUMENT from src/document.
2026-02-09 14:16:24 -08:00
SkyZeroZx cb1163e5e5 fix(http): correctly parse ArrayBuffer and Blob in transfer cache
Encodes arraybuffer and blob response bodies as base64 when storing in the transfer cache, ensuring correct retrieval and usage on the client side.

Fixes #66827
2026-02-09 12:32:12 -08:00
Leon Senft b772f518f1 refactor(forms): add fieldTree property to FieldState
The `fieldTree` property of `FieldState` returns its associated
`FieldTree`.

Note that the round trip from `FieldTree` to `FieldState` and back will
lose type information. This is because `FieldState` intentionally does
not know whether it came from a pure Signal Forms field tree, or a
Reactive Forms compatible field tree:

```ts
// Pure Signal Forms:
const x: FieldTree<string>;

x();           // FieldState<string>;
x().fieldTree; // FieldTree<unknown>

// Reactive Forms compatibility:
const y: FieldTree<FormControl<string>>;

y();            // FieldState<string>;
y().fieldTree;  // FieldTree<unknown>;
```
2026-02-09 12:28:35 -08:00
Miles Malerba adfb83146b fix(forms): simplify design of parse errors
Reoves the `parseErrors` property on `FormUiControl` and instead
introduces a new utility `transformedValue` that automatically handles
synchronizing the raw value and model value using the given `parse` and
`format` functions. It also automates the reporting of `parseErrors` to
the `FormField`, simplifying the API surface
2026-02-09 12:27:41 -08:00
SkyZeroZx f50ec42f15 refactor(forms): guard unsupportedFeatureError with ngDevMode
Move unsupportedFeatureError message behind ngDevMode
to keep it dev-only and allow proper tree-shaking.
2026-02-09 12:26:35 -08:00
SkyZeroZx 66e8385b6a refactor(common): extract argument assertion
Deduplicates string argument validation logic across pipes
by introducing a local assertion helper
2026-02-09 12:26:06 -08:00
Kristiyan Kostadinov 11834a4274 fix(compiler): add geolocation element to schema
A new `geolocation` tag was recently added to Chrome. These changes update the schema to account for it.

See https://developer.chrome.com/blog/geolocation-html-element
2026-02-09 12:25:37 -08:00
moraisacr d940885c5b docs(forms): replace 'legacy' with 'reactive' in migration guide and navigation
Updates terminology from 'Legacy Forms' to 'Reactive Forms' in:
- Migration guide documentation
- Navigation entries label

Fixes #66957
2026-02-09 12:24:03 -08:00
hawkgs c32e732d3d fix(devtools): runtime error when a cluster preview node is missing
Fix the runtime error produced when a cluster preview node is missing triggered during a signal update.
2026-02-09 12:23:17 -08:00
Alan Agius d019ee3c0b ci: add myself to pull approve dev-infra reviewers
Add myself to the dev-infra reviewers.
2026-02-09 12:22:18 -08:00
Angular Robot 20a24631a4 build: update pnpm to v10.29.1
See associated pull request for more information.
2026-02-09 12:21:19 -08:00
SkyZeroZx dd15efb7c3 docs(docs-infra): fix heading ID generation and display
Ensures that custom heading IDs are properly handled
2026-02-09 12:20:13 -08:00
SkyZeroZx fd293d3397 docs: add missing error codes to the error overview list 2026-02-09 12:19:39 -08:00
SkyZeroZx 0b9d1cfb7b docs(docs-infra): simplify external link rendering for pill
Renders the external link icon for docs pills using CSS instead of a `docs-icon` component.
2026-02-09 12:19:07 -08:00
Angular Robot 11767cabe4 build: update Jasmine to 6.0.0
Jasmine enables `forbidDuplicateNames: true` by default. So we also need to desambiguate duplicate spec names.
2026-02-09 12:15:57 -08:00
Miles Malerba 85d6a2bc6e build: configure gemini cli to look for AGENTS.md
By default gemini cli looks for GEMINI.md, these settings change it to
consider AGENTS.md as well
2026-02-09 12:15:17 -08:00
Miles Malerba 7ddd10bb44 docs: add gemini custom command for generating skills
Adds a Gemini CLI custom command (`/explain`) to generate skills for
working with code packages in this repo. Usage:

1. Add skill for a new package:
  `/explain packages/common`
2. Update the skill for a package:
  `/explain Update the skill for packages/core`
3. Add supplemental information:
  `/explain Add supplemental info to the signal forms skill about how
   schema logic is implemented`

Also adds a few skills for working with some of the packages I commonly
interact with, including:

- packages/forms/signals
- packages/core
- packages/compiler-cli
2026-02-09 12:14:15 -08:00
Matthieu Riegler 4b3b149ba1 refactor(benchpress): remove zone-based testing utilities
Transition to zoneless.
2026-02-09 07:55:12 -08:00
Matthieu Riegler ec26d38778 refactor(service-worker): remove zone-based testing utilities
Transition to zoneless.
2026-02-09 07:55:12 -08:00
Matthieu Riegler a1441a432d refactor(compiler): remove zone-based testing utilities
Having zone.js here already wasn't necessary.
2026-02-09 07:55:12 -08:00
hawkgs c4abadb528 fix(devtools): duplicated props in the properties panel
Fix the diff algorithm that consequentially caused the duplicated props.
2026-02-09 07:54:31 -08:00
Shuaib Hasan Akib 14f16226aa refactor(common): remove unused imports and standalone: false from examples
Cleans up example code by removing explicit `standalone: false`, since
standalone components are the default and recommended approach.
2026-02-09 07:53:31 -08:00
Shuaib Hasan Akib 0c6604f478 refactor(common): update copyright to Google LLC
Replaces outdated Google Inc copyright headers with Google LLC to align with current licensing standards.
2026-02-09 07:51:36 -08:00
aparziale 63d828aa33 docs: Signal forms custom validator with 'fieldTree' field in validation result error
Update docs for fieldTree property

fixes #66687
2026-02-06 15:10:59 -08:00
hawkgs ce0f0febe2 refactor(devtools): add a demo resource to the demo app
Add a demo resource for testing purposes.
2026-02-06 15:09:19 -08:00
Kristiyan Kostadinov 460dbbb8e9 docs: remove non-existant method
Removes the reference to the `focusFirstItem` method since it doesn't exist.

Fixes https://github.com/angular/components/issues/32741.
2026-02-06 10:20:31 -08:00
Angular Robot 15c71fba43 build: update all non-major dependencies
See associated pull request for more information.
2026-02-06 09:44:52 -08:00
Jessica Janiuk ea2016a6dc feat(core): add support for nested animations
Now if there's a leave animation nested within a template, those will animate before the parent element is removed. This makes animating leaving elements a bit easier than before and adds a lot more flexibility to how animations can be structured.

fixes: #66476
2026-02-06 09:42:34 -08:00
SkyZeroZx 24c0c5a180 feat(forms): support signal-based schemas in validateStandardSchema
Allow `validateStandardSchema()` to consume a computed schema so
validation rules stay in sync when the schema changes over time.

This supports schemas stored in computed signals (e.g. zod schemas that
depend on input signals) and ensures the effective schema updates after
initialization instead of being captured once.

Fixes #66867
2026-02-06 07:40:46 -08:00
Kristiyan Kostadinov 2ea6dfc6c9 fix(compiler-cli): update diagnostic to flag no-op arrow functions in listeners
Based on the discussion in #66294: now that we support arrow functions in event listeners, developers may write out something like `(click)="() => expr"` which will be a no-op. These changes update the existing diagnostic for uninvoked expressions in listeners to account for it.
2026-02-06 07:39:18 -08:00
Charles Lyding 108252bf67 refactor(language-service): use type-only TypeScript imports in some files
Standardize on `import type ts from 'typescript'` across several files
in the language-service package.

This ensures that these files do not have a runtime dependency on a
specific version of the TypeScript module, instead relying on the
instance provided by the host during initialization.

Note: This change is not comprehensive. Several files still require
runtime access to the TypeScript module and will require further
refactoring to fully decouple the dependency.
2026-02-06 07:38:48 -08:00
aparziale 6550b9d776 docs: Images not show
Fixed path in optimization image tutorial
2026-02-06 07:38:02 -08:00
hawkgs 64d34da0b2 fix(devtools): signal node value preview for afterRenderEffect
Render an arrow function (`() => {}`) in the signal nodes in the graph that represent `afterRenderEffect`s.
2026-02-06 07:36:43 -08:00
Matthieu Riegler fd5ff5c1a9 docs: callout for optional fields and native controls. 2026-02-06 07:35:13 -08:00
Angular Robot 8a3f312115 build: update dependency jsdom to v28
See associated pull request for more information.
2026-02-06 07:34:35 -08:00
Shuaib Hasan Akib e79e7994d4 docs: fix wrong line highlight in component queries example 2026-02-06 07:33:56 -08:00
Shuaib Hasan Akib 12afc1d164 docs: use self-closing tag
Aligns template syntax with modern Angular recommendations and improves readability.
2026-02-06 07:33:11 -08:00
Angular Robot 6fa227031e docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-02-05 17:17:53 -08:00
SkyZeroZx 2a0241a665 test(compiler): remove zone-based testing utilities
Removes usages of zone-based helpers such as
`waitForAsync` as part of the migration to zoneless tests.

Completes the transition to zoneless.
2026-02-05 16:56:55 -08:00
SkyZeroZx 6883889123 docs: remove Component suffix in reference and tools 2026-02-05 16:55:26 -08:00
Angular Robot 407ab1a92f build: update rules_browsers digest to e08ae33
See associated pull request for more information.
2026-02-05 16:52:03 -08:00
Angular Robot ec6334da85 build: update all github actions
See associated pull request for more information.
2026-02-05 16:51:32 -08:00
Alan Agius 85dd096c11 build: remove dagre-d3-es pnpm patch from MODULE.bazel
This file no longer exist
2026-02-05 16:50:17 -08:00
Matthieu Riegler 3e2ed305d1 ci: exclude standard_schema from sync.
This file isn't sync into G3 and this should prevent the CI from requiring a presubmit when the file is modified.
2026-02-05 16:49:43 -08:00
Shuaib Hasan Akib ff2c0053c8 docs: improve type safety in custom validator documentation
Replace `field: any` with proper SchemaPath typing in Signal Forms custom
validation examples to match built-in validator patterns.

fixes: #66887

Update adev/src/content/guide/forms/signals/validation.md

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2026-02-05 16:49:08 -08:00
Angular Robot 91ed22c241 build: lock file maintenance
See associated pull request for more information.
2026-02-05 16:48:35 -08:00
Leon Senft c3229b3136 release: cut the v21.2.0-next.2 release 2026-02-04 16:15:40 -08:00
Leon Senft 8fe34e146b docs: release notes for the v21.1.3 release 2026-02-04 16:08:22 -08:00
kbrilla 8c21866f49 feat(language-service): add linked editing ranges for HTML tag synchronization
This feature enables synchronized editing of opening and closing HTML tag pairs
in Angular inline templates. When the cursor is on an element tag name, editing
it will automatically update the corresponding tag.

Implementation:
- Add getLinkedEditingRangeAtPosition method to NgLanguageService interface
- Implement linked editing range detection for opening and closing tags
- Handle edge cases: self-closing elements, void elements, cursor detection
- Export through ts_plugin wrapper to override TypeScript JSX-only implementation
- For external HTML templates, VS Code built-in HTML support handles linked editing
2026-02-04 15:45:27 -08:00
Matthieu Riegler 01ed57f297 fix(vscode-extension): support highlighting for class bindings with brackets
Tailwind classes can often be quite complex strings. This change adds supports for classes with backets.

fixes #66818
2026-02-04 15:45:04 -08:00
Charles Lyding 03e1a95c26 refactor(language-service): decouple TypeScript dependency in ts_plugin
Update `ts_plugin.ts` to use the TypeScript instance provided by the
editor during initialization instead of a local import. This prevents
potential issues caused by version mismatches between the plugin's
internal TypeScript dependency and the version used by the host.
2026-02-04 15:44:00 -08:00
SkyZeroZx 7dfbacbcf8 test(forms): remove zone-based testing utilities
Removes usages of zone-based helpers such as `fakeAsync` , `tick`
`waitForAsync` as part of the migration to zoneless tests.

Completes the transition to zoneless.
2026-02-04 15:38:09 -08:00
Walter Breakell d6585fe837 docs: fix syntax errors and improve grammar in navigation guide 2026-02-04 15:37:17 -08:00
Jef 81876c2583 docs: fix typo
Add missing n to componet(s)
2026-02-04 15:36:49 -08:00
Ben Hong 38428945ac docs: add guidance on submit and novalidate for signal forms 2026-02-04 15:36:18 -08:00
Doug Parker da1f61cfbd release: bump Angular DevTools version to 1.10.0 2026-02-04 14:46:56 -08:00
Kristiyan Kostadinov 680d99b1c3 refactor(forms): work around internal issue
Works around an internal property renaming issue by changing how we declare the interface for `InteropNgControl`.
2026-02-04 14:25:44 -08:00
David Neil cab5ddd526 fix(core): hold constructors weakly in DepsTracker cache
Otherwise a component can be held in memory longer than
the component constructor is reachable from application code.
2026-02-03 12:44:23 -08:00
Miles Malerba 95ecce8334 feat(forms): allow setting submit options at form-level
Updates FormOptions to accept a submission configuration object.
This allows defining default submit options (action, validation behavior, etc.)
when creating the form, which can be overridden when calling submit().
2026-02-03 12:43:31 -08:00
Miles Malerba dd208ca259 feat(forms): update submit function to accept options object
Changes the `submit` function signature to accept a `FormSubmitOptions` object instead of a direct action callback.
This allows for more flexibility, including:

- `action`: The standard submit action to perform with the data.
- `onInvalid`: A callback to execute when the submit action is not triggered due to failing validation
- `ignoreValidators`: Controls whether pending validators or invalid validators should be ignored

Also updates the return value of `submit` to a `Promise<boolean` to indicate submission success.
2026-02-03 12:43:31 -08:00
Matthieu Riegler 43d61ecbb2 docs(docs-infra): extract call signature return type.
fixes #66799
2026-02-03 12:31:36 -08:00
Shuaib Hasan Akib cfa7664361 docs: generalize wording for CSP nonce configuration options
Replaces “one of two ways” with “one of the following ways” to avoid
hardcoding the number of supported approaches and keep the
documentation accurate if options change.

fixes: #66861
2026-02-03 12:27:11 -08:00
Matthieu Riegler 9c032972a8 docs(docs-infra): fix foot width
This was due to a regression introduced by #66825

fixes #66880
2026-02-03 12:25:42 -08:00
David Neil 3867cd8554 perf(router): Use .bind to avoid holding other closures in memory
In many JS runtimes all closures created in the same scope share a context
this means that data held in one of the closures is not collected until all of the closures are collected.
This change prevents the returned promise from holding a reaction that holds the entire `Router` object in memory.
2026-02-03 12:24:58 -08:00
Jessica Janiuk 5a0f272519 Revert "feat(router): adds browserUrl input support to router links"
This reverts commit 9505541d32.
2026-02-02 16:32:09 -08:00
SkyZeroZx 68ba9c45cb test(router): remove provider zoneless from tests
Removes the `provideZonelessChangeDetection` provider from router tests.
It’s no longer needed and simplifies the test setup.
2026-02-02 15:00:18 -08:00
kirjs c750b3cf11 refactor(forms): Setup closure compatible property override
We have to do this because Abstract control doesn't allow us to have value as a getter type-wise
2026-02-02 14:51:40 -08:00
kirjs 80f08838b0 refactor(forms): Address more feedback
Clean up tests, drop old todos
2026-02-02 14:51:40 -08:00
kirjs fdae63c11f refactor(forms): Address more feedback
Make the way reset works for it to be more consistent
2026-02-02 14:51:40 -08:00
kirjs e4eeb3adc0 refactor(forms): Address more feedback
Untrack callbacks, so they are not called when signals change
2026-02-02 14:51:40 -08:00
kirjs b3b5611096 refactor(forms): Address more feedback
Document that injectors are optional
2026-02-02 14:51:40 -08:00
kirjs df32f957f9 refactor(forms): Address more feedback
Add some TODOs for future things
2026-02-02 14:51:40 -08:00
kirjs 0df5442f4e refactor(forms): Address more feedback
- Add more comments and docs
- In signalErrorsToValidationErrors return null for empty object
- Drop messages in prod mode
2026-02-02 14:51:40 -08:00
kirjs dabe34ad06 refactor(forms): Clean up the way errors are done
Make them tree-shakeable and fix the naming
2026-02-02 14:51:40 -08:00
kirjs 8e80575ff4 refactor(forms): address feedback
Consolidate everything related to converting errors in one place
2026-02-02 14:51:40 -08:00
kirjs 05d5087252 refactor(forms): use markAsPristine and markAsUntouched on field node
This make things cleaner
2026-02-02 14:51:40 -08:00
kirjs bbbdf0a6ed refactor(forms): add unsupported method errors and docs
- Add disable, enable methods that throw with helpful messages
- Add validator methods (set/add/remove/clear) that throw
- Add setErrors, markAsPending methods that throw
- Add setters for dirty/pristine/touched/untouched that throw
- Add JSDoc with @usageNotes examples
- Add comprehensive unit tests for SignalFormControl
- Add FormGroup/FormArray integration tests
- Add web tests for CVA directive lifecycle
- Update migration docs with SignalFormControl usage
2026-02-02 14:51:40 -08:00
kirjs a2950805df refactor(forms): add CVA callback registration
- Add registerOnChange, _unregisterOnChange for value change callbacks
- Add registerOnDisabledChange, _unregisterOnDisabledChange for disabled callbacks
- Add disabled changes effect to notify registered callbacks
- Call onChange callbacks from updateValue with emitModelEvent flag
2026-02-02 14:51:40 -08:00
kirjs 35d02f228c refactor(forms): add fieldTree wrapping for sync parent updates
- Add CachingWeakMap utility for memoization
- Add wrapFieldTreeForSyncUpdates Proxy wrapper
- Intercept fieldTree().value.set() calls to sync parent immediately
- Cache wrapped trees and states to preserve identity
2026-02-02 14:51:40 -08:00
kirjs d6b49f12ef refactor(forms): add FormGroup/FormArray parent integration
- Add ValueUpdateOptions type with onlySelf, emitEvent options
- Add parent notification on value changes via effect
- Add parent notification helpers: scheduleParentUpdate, notifyParentUnlessPending
- Propagate dirty/touched/pristine/untouched to parent
- Support onlySelf option to prevent parent propagation
2026-02-02 14:51:40 -08:00
kirjs c2e0be7600 refactor(forms): add events observable with ControlEvents
- Emit ValueChangeEvent, StatusChangeEvent on changes
- Emit TouchedChangeEvent, PristineChangeEvent on status changes
- Emit FormResetEvent on reset()
- Add emitControlEvent helper method
2026-02-02 14:51:40 -08:00
kirjs b63496853d refactor(forms): add valueChanges and statusChanges observables
- Add valueChanges EventEmitter that emits when source signal changes
- Add statusChanges EventEmitter that emits when status changes
- Set up effects to emit to observables
2026-02-02 14:51:40 -08:00
kirjs 1e3462db00 refactor(forms): add reset functionality
- Add reset() method with optional value parameter
- Support FormControlState unboxing ({value, disabled} format)
- Add isFormControlState helper function
2026-02-02 14:51:40 -08:00
kirjs ab3f4367f4 refactor(forms): add dirty/touched status management
- Add dirty, pristine, touched, untouched getters
- Add markAsTouched, markAsDirty methods
- Add markAsPristine, markAsUntouched methods (preserve other state)
2026-02-02 14:51:40 -08:00
kirjs bb5e75a5a1 refactor(forms): add disabled state support via rules
- Add disabled, enabled, pending getters
- Update status getter to check disabled state first
- Add UNSUPPORTED_FEATURE error code for future use
2026-02-02 14:51:40 -08:00
kirjs 3937afc316 feat(forms): introduce SignalFormControl for Reactive Forms compatibility
This commit introduces `SignalFormControl`, a bridge implementation that allows Signal-based forms to interoperate with existing Reactive Forms infrastructure. It extends `AbstractControl` with standard methods and reactive observables while handling state propagation to parent containers.
2026-02-02 14:51:40 -08:00
Shahar Har-Shuv f29fcd882a docs: Rename Field directive -> FormField in form-logic.md 2026-02-02 14:40:59 -08:00
Angular Robot 50af8cbd15 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-02-02 14:40:31 -08:00
Alex Rickabaugh aff9e36a98 fix(core): linkedSignal.update should propagate errors
Unlike a normal `signal()`, a `linkedSignal()` can be in an error state when
its computation fails. Currently, there's a bug where `linkedSignal.update`
does not account for this error state, and will pass the internal `ERRORED`
`Symbol` as the current value to the updater function.

This commit fixes the issue by having `update()` check and throw the error
instead of calling the updater function.
2026-02-02 12:21:28 -08:00
Kristiyan Kostadinov 8ab433abdd fix(core): export DirectiveWithBindings
Exports the `DirectiveWithBindings` interface since it's part of the public API of `createComponent`.

Fixes #66851.
2026-02-02 11:08:42 -08:00
SkyZeroZx 9505541d32 feat(router): adds browserUrl input support to router links
Enables specifying a custom browser URL for router links via a new input,
allowing navigation to use an explicit browser URL in navigation options.

Closes #66805
2026-02-02 11:08:18 -08:00
SkyZeroZx 70615117a2 feat(docs-infra): Implements select component using Angular Aria
Replaces the native select element with a custom combobox implementation for improved accessibility and styling.
2026-02-02 11:07:53 -08:00
Charles Lyding 1fa7879cfd refactor(language-service): delegate plugin initialization to bundle
Updates the plugin factory to directly invoke the 'initialize' function from the
Angular Language Service bundle. This replaces manual proxying and lazy-loading
logic with direct delegation, unifying the instantiation process within the bundle.
2026-02-02 11:07:06 -08:00
AleksanderBodurri 35046d3dba feat(devtools): promote router tree to stable
Previous the router tree was an opt-in feature that required manual enablement in settings.

Now the router tree is enabled by default whenever the application supports it and routes are detected.
2026-02-02 11:06:42 -08:00
SkyZeroZx cdbb957334 docs(docs-infra): Fix border color issue on aria select when closing on outside click
Prevents incorrect border color from appearing on close triggered by an outside click
2026-02-02 11:04:44 -08:00
dominicbachmann a64a90dbbe docs(animations): fix small typo in animations migrations docs 2026-02-02 10:18:05 -08:00
Jaime Burgos bd27aa2cf3 docs: remove component suffix router guide 2026-02-02 10:17:36 -08:00
SkyZeroZx 4aae3379c2 test(forms): migrate reactive forms and value accessors to zoneless
Migrates reactive forms, template-driven forms, and value accessors to zoneless tests.
2026-02-02 10:16:58 -08:00
SkyZeroZx 825122b6d2 docs: update llms.txt 2026-02-02 10:14:03 -08:00
kirjs 19aa1eb95e docs: rename agents.md to AGENTS.md 2026-02-02 10:10:41 -08:00
kirjs a8d0155303 docs: add PR section to agents.md 2026-02-02 10:10:41 -08:00
kirjs 9306abe883 docs: add agent configuration guide
Adds agents.md to the root directory to provide context and instructions for AI agents working in this repository.
2026-02-02 10:10:41 -08:00
SkyZeroZx 522c5ba868 docs(docs-infra): ensure code preview copy preserves spaces
Preserve whitespace when copying code examples from the docs. Fixes the copy handler so copied snippets keep original spacing.

Fixes #66790
2026-02-02 10:09:35 -08:00
Jaime Burgos 3d09d8e831 docs: update zoneless guide 2026-02-02 10:05:22 -08:00
Andrew Scott 8d5210c9fe feat(core): add ChangeDetectionStrategy.Eager alias for Default
Adds `ChangeDetectionStrategy.Eager` as an explicit alias for `ChangeDetectionStrategy.Default`. This improves readability when contrasting with `OnPush`, clarifying that the component will be checked eagerly when traversal reaches it.

Compiler findings:
- The compiler resolves `ChangeDetectionStrategy` enum members by value in `resolveEnumValue` (see `packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.ts`).
- Since `Eager` has usage value `1` (same as `Default`), it is correctly interpreted during static analysis.
- At runtime, `defineComponent` (in `packages/core/src/render3/definition.ts`) checks `changeDetection === ChangeDetectionStrategy.OnPush` (0). Any other value, including `1` (Eager/Default), results in eager checking behavior (`onPush: false`).
2026-01-30 14:20:52 -08:00
Charles Lyding 496967e7b1 feat(language-service): add JSON schema for angularCompilerOptions
This commit introduces a JSON schema for angularCompilerOptions in the
Angular Language Service extension. It provides validation and autocompletion
for Angular-specific options in tsconfig.json files.
2026-01-30 14:20:25 -08:00
Angular Robot 424ecf840d build: update dependency @actions/core to v3
See associated pull request for more information.
2026-01-30 09:34:15 -08:00
Leon Senft 9a3d5b36c2 docs(forms): fix incorrect import statement
Correct the import statement used to import `NG_STATUS_CLASSES` in the
migration guide.
2026-01-30 09:30:45 -08:00
Leon Senft 346ceb7dc0 docs: fix typos
Fix typos introduced in some recent changes.
2026-01-30 09:30:45 -08:00
SkyZeroZx b1bf535f8e fix(forms): Resolves debounce promise on abort in debounceForDuration
Ensures the promise returned by the debouncer resolves
when aborted, preventing potential hangs for awaiting consumers.
Fixes #66646
2026-01-30 09:19:42 -08:00
Leon Senft 26d12158e1 refactor(forms): convert FieldState.controlValue to a WritableSignal
Remove `setControlValue()` from `FieldState` and convert `controlValue` to a
`WritableSignal` whose setter implements the debounced syncing behavior
of `setControlValue()`.
2026-01-30 09:14:14 -08:00
Angular Robot af76b9dd4d build: update dependency @actions/github to v9
See associated pull request for more information.
2026-01-30 09:04:12 -08:00
Charles Lyding b327d72ed2 refactor(language-service): initial use of type-only imports and standard server types
This commit converts the typescript import in api.ts to a type-only import
and updates the plugin factory to utilize standard TypeScript server types.
Internal interfaces and specific service types are replaced with general
types to decouple the factory wrapper from internal implementations.
2026-01-29 16:06:17 -08:00
Angular Robot 74e7681142 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-01-29 13:32:54 -08:00
Alex Rickabaugh a67e00741c refactor(forms): move control logic into FormField directive
Refactors the `ɵɵcontrolCreate` and `ɵɵcontrol` instructions to delegate control logic to the forms package via new `ɵngControlCreate` and `ɵngControlUpdate` lifecycle hooks. Previously, the logic for binding form state to native elements and custom controls was hardcoded within `@angular/core`.

**Compiler Changes:**
- Introduces a new compilation phase `specializeControlProperties` (in `control_directives.ts`).
- This phase detects properties named `formField` and specializes them into `ControlCreate` and `Control` IR opcodes.
- These opcodes emit `ɵɵcontrolCreate` and `ɵɵcontrol` instructions, respectively.

**Runtime Changes:**
- `ɵɵcontrolCreate` acts as the creation phase. It locates the control directive and invokes its `ɵngControlCreate` method.
- `ɵɵcontrol` acts as the update phase, and invokes the control directive's `ɵngControlUpdate` method (if present).
- Introduces a `passThroughInput` configuration in `ControlFeature`. This specifies the input name (e.g., `formField`) that triggers the control. If the runtime detects that this input is bound to multiple targets (e.g., the `FormField` directive *and* the host component), the control is flagged as "pass-through". In this state, `ɵngControlCreate` returns a no-op update function, deferring responsibility to the other consumer (e.g., the component managing the field itself).

**Forms Changes:**
- `FormField` directive implements `ɵngControlCreate` and `ɵngControlUpdate`.
- Inside this hook, `FormField` determines the type of control it is attached to (Native, CVA, or Custom Signal Control) and delegates to the appropriate handler (`nativeControlCreate`, `cvaControlCreate`, or `customControlCreate`).
- Consolidates all form binding logic within `@angular/forms/signals`, enabling support for new `FormValueControl` and `FormCheckboxControl` interfaces.
- Reorganizes the codebase by moving `FormField` from `api/` to `directive/` and splitting the binding logic into semantic pieces:
    - `control_native.ts`, `control_cva.ts`, and `control_custom.ts` contain the specific handlers for each control type.
    - `native.ts` and `select.ts` provide helpers for native element discovery and select-specific synchronization.
    - `bindings.ts` manages the tracking and application of property/attribute bindings.
2026-01-29 13:17:40 -08:00
Alex Rickabaugh 88e6ebec01 refactor(forms): move standard schema types out of shared files
Consolidating the standard schema support into `standard_schema.ts` will
cut down on unnecessary g3 patch changes whenever we change
`validation_errors.ts`.
2026-01-29 13:17:40 -08:00
Charles Lyding f9bcccc2b9 build(language-service): remove local development build script
The standalone build.sh script for the language service is no longer
required as the vscode-ng-language-service repository has been merged
into this monorepo. Local development and testing of the extension
can now be handled via the integrated build system.
2026-01-29 13:16:49 -08:00
Matthieu Riegler 72dfb4d92a docs(docs-infra): wrap getTextOfJSDocComment
This commits adds a wrapper around `ts.getTextOfJSDocComment` because of bugs that won't be fixed by the TS team (see microsoft/TypeScript#63027)
2026-01-29 13:16:00 -08:00
Shuaib Hasan Akib 6990f88d97 feat(docs-infra): increase table-of-contents width for large screens
Add media query overrides to expand the table-of-contents width on extra-large desktops.

fixes: #66823
2026-01-29 12:24:00 -08:00
Angular Robot df3258cfc4 build: update all non-major dependencies
See associated pull request for more information.
2026-01-29 12:22:40 -08:00
Angular Robot 528ce58222 build: update bazel dependencies
See associated pull request for more information.
2026-01-29 12:22:00 -08:00
Jessica Janiuk c66a19f0de fix(core): prevent element duplication with dynamic components
When dynamic components are rapidly added and removed with animate.leave and animate.enter, a leave animation might fire before the enter animation could, causing an element to be retained. This fix prevents that from occuring by clearing the enter animations in this case.

fixes: #66794
2026-01-29 12:18:00 -08:00
Charles Lyding 1c3b1cf18d fix(localize): add support for unit-test builder in ng-add schematic
This commit updates the @angular/localize ng-add schematic to support
the @angular/build:unit-test builder. It ensures that @angular/localize
is added to the types array in the TypeScript configuration file
associated with the unit-test target. If no tsConfig is specified in
the target options, it defaults to tsconfig.spec.json in the project root.
2026-01-29 12:17:15 -08:00
Andrew Scott 458bc4a2c8 fix(router): limit UrlParser recursion depth to prevent stack overflow
Deeply nested parentheses in URLs (e.g. `(a/(b/(c...)))`) trigger recursive calls in `UrlParser`, which can lead to a `RangeError: Maximum call stack size exceeded`. While such errors are generally caught by the framework, relying on the runtime's stack limit is unpredictable across different environments and engine states (e.g. varying stack sizes in different browsers or Node.js versions).

The deeply nested parentheses  can cause a stack overflow. While such URLs can be valid (e.g., `(a/(b/(c...)))`) and serialize to simple paths (e.g., /a/b/c), excessive nesting is unreasonable and likely malicious or accidental.

Linear paths (e.g. /a/b/c/d) are parsed iteratively and do NOT trigger recursion. Only parentheses trigger recursion.

This commit introduces a recursion depth limit of 50. If parsing exceeds this depth, the router will now throw a specific `UNPARSABLE_URL` error with the message "URL is too deep". This ensures a deterministic failure mode that is easier for applications to handle than a crash or generic RangeError.

The limit of 50 is chosen as it should accommodate any reasonable application URL structure (including complex named outlets) while providing a safe upper bound against abusive payloads.

This is essentially a refactor of the error state:

* Before: RangeError (System says "I'm out of stack memory")
* After: RuntimeError (Validator says "Input is invalid")

This provides:

* Semantic Correctness: The error now correctly blames the input ("URL too deep"), not the environment ("Stack full").
* Cross-Platform Consistency: The limit is the same in Chrome, Firefox, Node, and Deno, regardless of their internal recursion limits.
* Fast Failure: We stop at depth 50 instead of depth ~15,000, saving those cycles (though CPU cost is negligible either way).

"wide" URLs are now theoretically more expensive than "deep" URLs (because deep ones fail fast), but both are well within safe bounds for any reasonable input size.
2026-01-29 12:15:21 -08:00
Andrew Scott 907a94dcec feat(router): Update IsActiveMatchOptions APIs to accept a Partial
This updates `RouterLinkActive`, `Router.isActive`, and the standalone
`isActive` function to accept `Partial<IsActiveMatchOptions>` which uses
the current default values as the base (paths and queryParams are
subset, fragment and matrix params are ignored).

fixes #53326
2026-01-29 12:10:40 -08:00
Andrew Scott cf9620f7d0 feat(router): Make match options optional in isActive
The behavior now matches RouterLinkActive.
2026-01-29 12:10:40 -08:00
SkyZeroZx 0c2efc0d46 refactor(core): Remove unsued properties in differ factories
Simplifies differ factories by removing unnecessary constructors and properties.

Also removes the formatError function as it is no longer used.
2026-01-29 12:06:32 -08:00
JakobDev 0e04233a7c docs: Add missing link in HostListener documentation 2026-01-29 11:56:42 -08:00
SkyZeroZx d072791f13 refactor(core): remove unused restriction parameter
Removes the `restriction` parameter from `registerAppScopedDispatcher` and `registerGlobalDispatcher`.
2026-01-28 20:54:46 +00:00
Andrew Scott 5a6fefb687 release: cut the v21.2.0-next.1 release 2026-01-28 20:49:59 +00:00
Andrew Scott 571747d5cc docs: release notes for the v21.1.2 release 2026-01-28 20:39:31 +00:00
Charles Lyding 7bb241f7b6 refactor(language-service): introduce withFallback helper in ts_plugin
This commit refactors the `ts_plugin.ts` implementation to use a new `withFallback` helper function. This helper encapsulates the common logic of delegating requests to either the Angular language service directly (for non-TS files or when `angularOnly` is true) or trying the TypeScript language service first before falling back to the Angular language service.
2026-01-28 19:24:16 +00:00
Angular Robot d7672cfceb build: update pnpm to v10.28.2
See associated pull request for more information.
2026-01-28 19:22:35 +00:00
Leon Senft e682e53113 fix(forms): only touch visible, interactive fields on submit
Don't touch hidden, disabled, or readonly fields on submit, since they
don't contribute to form validity. This also prevents errors from
appearing immediately if they're later made interactive.

Fix #66344
2026-01-28 18:56:02 +00:00
Georgi Serev 042471044d refactor(devtools): snap to signal graph nodes selected from the properties panel
Snap to the signal graph node of a corresponding property when the user uses "Show 'prop' signal graph" button.
2026-01-28 18:33:37 +00:00
Angular Robot 1b324a2ca6 build: lock file maintenance
See associated pull request for more information.
2026-01-28 18:26:45 +00:00
Angular Robot a4f6d407c2 build: update cypress-io/github-action action to v7
See associated pull request for more information.
2026-01-28 18:17:25 +00:00
Matthieu Riegler 611f6a49d1 docs: reword docs on standalone.
fixes #66773
2026-01-28 18:16:54 +00:00
Angular Robot 177234a6f7 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-01-28 18:16:27 +00:00
Angular Robot bea4cb72d1 build: update dependency @actions/github to v8
See associated pull request for more information.
2026-01-28 17:56:06 +00:00
Alan Agius 4123ebf61e release: bump Angular DevTools version to 1.9.0 2026-01-28 10:52:59 +01:00
Leon Senft 01bfb83fc9 test(forms): submit behavior while validation is pending
Ensure `submit()` behaves as expected while a form is pending.

- Submission is not blocked by pending validation.
- Submission errors prevent pending validation errors from appearing
  after they resolve on the same field.
- Submission errors don't prevent pending validation errors from
  appearing after they resolve on subfields.
2026-01-28 00:15:29 +00:00
Jaime Burgos 4448356313 test(common): enables zoneless change detection in tests
Adds `provideZonelessChangeDetection` to TestBed configurations in  `ngComponentOutlet` , `ngOptimizedImage` , `ngTemplateOutlet` and `ngPlural`.
2026-01-28 00:08:46 +00:00
Angular Robot 960de629ed build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-27 20:11:06 +00:00
Shuaib Hasan Akib 160a8b4be7 docs: fix wrong line highlights
Corrects incorrect line highlighting in code examples so the highlighted
lines match the intended sections being explained.
2026-01-26 23:56:42 +00:00
Andrew Scott 8a7cbd4668 fix(language-service): Detect local project version on creation
This updates the language service to use the detected version of angular
core in the given project on load rather than the minimum detected
version in the workspace
2026-01-26 23:51:31 +00:00
Angular Robot 3e7808b39f build: update cross-repo angular dependencies
See associated pull request for more information.

Closes #66702 as a pr takeover
2026-01-26 23:51:05 +00:00
Andrew Scott b51bab583d feat(router): Add partial ActivatedRouteSnapshot information to canMatch params
This commit adds partial `ActivatedRouteSnapshot` information as the
third parameter of the `canMatch` guard.

resolves #49309
2026-01-26 23:36:06 +00:00
Andrew Scott 57e80a5737 refactor(router): Add type for partial ActivatedRouteSnapshot for easier re-use
This adds a type for the partial `ActivatedRouteSnapshot` that includes
only information up to a point in the matching algorithm.
2026-01-26 23:36:06 +00:00
Andrew Scott 042e6d2616 refactor(router): extract snapshot creation to shared helper
extracts ActivatedRouteSnapshot creation to a shared helper method
2026-01-26 23:36:06 +00:00
Matthieu Riegler 899df39c7c docs(docs-infra): remove unused examples 2026-01-26 23:19:35 +00:00
Shuaib Hasan Akib ceefceb004 docs: normalize spacing in animation example boxes
Simplifies box padding and removes default paragraph margins to ensure consistent spacing and alignment
in the animation examples.
2026-01-26 22:59:28 +00:00
SkyZeroZx c921786260 docs: Updates form documentation (#66732)
Updates the form documentation to link to the API reference for the `form()` function.

Also removes unused `HttpClient` import from the async validation example.

PR Close #66732
2026-01-26 22:46:11 +00:00
SkyZeroZx 6e9da70b35 docs(docs-infra): Exempts more symbols from automatic linking (#66732)
Extends the list of symbols that should not be
automatically linked for forms.

PR Close #66732
2026-01-26 22:46:11 +00:00
Shuaib Hasan Akib 8efee1c71d docs: apply prefer/avoid blocks in UI with comments
Apply inline comments with proper Prefer and Avoid UI blocks so
guidance is more visible and consistent across the documentation.
2026-01-26 22:33:11 +00:00
Matthieu Riegler 87a72f3dd0 docs: add mentions of the global target syntax. 2026-01-26 22:31:11 +00:00
Georgi Serev 9625780259 docs(docs-infra): update the look of api items state labels
Update how dev preview, experimental and deprecated labels are visualized in the API list to avoid ambiguity with the current design on larger screens.
2026-01-26 22:30:19 +00:00
Andrew Scott dbd50be7f7 fix(router): Do not intercept reload events with Navigation integration
This commit prevents the Router from intercepting reload navigations
in the navigate event listener. This would convert hard page reloads
to SPA navigations.

fixes #66746
2026-01-26 22:29:51 +00:00
Miles Malerba fb05fc86d0 fix(forms): sort error summary by DOM order
This will allow users to rely on the `errorSummary` order to implement
features like "focus next error"
2026-01-26 22:29:07 +00:00
SkyZeroZx 1df564b9f9 refactor(core): remove index from text node creation
Removes unnecessary `index` parameter from `_locateOrCreateTextNode`
and `locateOrCreateTextNodeImpl` functions.
2026-01-26 22:22:56 +00:00
Shuaib Hasan Akib ca9b5bd658 docs: fix wrong line highlight in lightweight injection token for API definition example 2026-01-26 22:22:00 +00:00
huangkevin-apr b3f2bad593 docs(docs-infra): improve accessibility of search dialog trigger
- Add explicit aria-label for screen reader users
- Preserve title tooltip for mouse users
2026-01-26 22:21:36 +00:00
Angular Robot aeb4b419af build: update all github actions
See associated pull request for more information.
2026-01-26 22:20:37 +00:00
Damian Sire ffe40f4bfa docs: fix Genkit documentation URL
Update the Genkit Angular integration documentation link from the old path
/docs/angular/ to the current correct path /docs/frameworks/angular/

This ensures developers are directed to the correct and up-to-date
documentation for integrating Genkit with Angular applications.
2026-01-26 22:20:13 +00:00
Modeste ASSIONGBON 19b59df2dc docs: fix typo in designing-your-form-model.md
"A form model model" -> duplicated word
"to save bytes me might want" -> "we" instead of "me"
2026-01-26 22:19:50 +00:00
SkyZeroZx 8feb541060 refactor(core): improve tree-shaking
Refactors getNodeInjectable to avoid pulling in stringifyForError production builds, reducing unnecessary symbols in production bundles
2026-01-26 22:18:56 +00:00
AleksanderBodurri 105274fe32 feat(devtools): mark special element injector providers as internal
Differentiates special providers like ElementRef from other providers in the DevTools UI.
2026-01-26 22:18:02 +00:00
Ben Hong 1d1777931e docs: add signal forms - form logic guide
Co-authored-by: Leon Senft <leonsenft@users.noreply.github.com>
2026-01-26 22:13:58 +00:00
Jaime Burgos d306737e54 docs: add resource composition with snapshots section 2026-01-26 17:02:48 +00:00
Andrew Scott 8bbe6dc46c feat(common): Add Location strategies to manage trailing slash on write
Adds dedicated `LocationStrategy` subclasses: `NoTrailingSlashPathLocationStrategy` and `TrailingSlashPathLocationStrategy`.

The `TrailingSlashPathLocationStrategy` ensures that URLs prepared for the browser always end with a slash, while `NoTrailingSlashPathLocationStrategy` ensures they never do. This configuration only affects the URL written to the browser history; the `Location` service continues to normalize paths by stripping trailing slashes when reading from the browser.

Example:
```typescript
providers: [
  {provide: LocationStrategy, useClass: TrailingSlashPathLocationStrategy}
]
```

This approach to the trailing slash problem isolates the changes to the
existing LocationStrategy abstraction without changes to Router, as was
attempted in two other options (#66452 and #66423).

From an architectural perspective, this is the cleanest approach for several reasons:

1. Separation of Concerns and "Router Purity": The Router's primary job is to map a URL structure to an application state (ActivatedRoutes). It shouldn't necessarily be burdened with the formatting nuances of the underlying platform unless those nuances affect the state itself. By pushing trailing slash handling to the LocationStrategy, you treat the trailing slash as a "platform serialization format" rather than a "router state" concern. This avoids the "weirdness" in #66423 where the UrlTree (serialization format) disagrees with the ActivatedRouteSnapshot (logical state).

2. Tree Shakability: If an application doesn't care about trailing slashes (which is the default "never" behavior), they don't pay the cost for that logic. It essentially becomes a swappable "driver" for the URL interaction.

3. Simplicity for the Router: #66452 (consuming the slash as a segment) bleeds into the matching logic, potentially causing issues with child routes or wildcards effectively "eating" a segment that should be invisible. This option leaves the matching logic purely focused on meaningful path segments by continuing to strip the trailing slash on read.

4. Consistency with Existing Patterns: Angular already uses LocationStrategy to handle Hash vs Path routing. Adding "Trailing Slash" nuances there is a natural extension of that pattern—it's just another variation of "how do we represent this logic in the browser's address bar?"

fixes #16051
2026-01-23 20:09:23 +00:00
Andrew Scott 6fb39d9b62 feat(language-server): Support client-side file watching via onDidChangeWatchedFiles
This implements `onDidChangedWatchedFiles` in the language server, which
allows the client to communicate changes to files rather than having the
server create system file/directory watchers.

This option is enabled in the extension via the
`angular.server.useClientSideFileWatcher` setting.
When enabled, the extension registers a FileSystemWatcher for .ts, .html, and package.json files and forwards events to the server. The server completely disables its internal native file watchers (via a new 'ServerHost' implementation that stubs watchFile/watchDirectory).

This is significantly more performant and reliable than native watching for several reasons:
- Deduplication: VS Code already watches the workspace. Piggybacking on these events prevents the server from duplicating thousands of file watchers.
- OS Limits: Since the server opens zero watcher handles, it is impossible to hit OS limits (ENOSPC), no matter how large the repo is.
- Optimization: VS Code's watcher uses highly optimized native implementations (like Parcel Watcher in Rust/C++) which handle recursive directory watching far better than Node.js's 'fs.watch'.
- Debouncing: The client aggregates extremely frequent file events (e.g., during 'git checkout'), reducing the flood of processing requests to the server.

This option was tested in one very large internal project and observed
~10-50x improvement of initialization times.

fixes #66543
2026-01-23 19:52:37 +00:00
SkyZeroZx 85122cb12d docs: update bootstrapApplication docs 2026-01-23 19:45:13 +00:00
Matthieu Riegler ddd3198dc2 docs: update signal form tutorials to use FormField 2026-01-23 01:02:17 +00:00
Angular Robot d1135f5840 build: update dependency aspect_rules_js to v2.9.2
See associated pull request for more information.
2026-01-22 23:31:27 +00:00
SkyZeroZx 30b50e7142 docs(docs-infra): Exempts more symbols from automatic linking
Extends the list of symbols that should not be
automatically linked.
2026-01-22 23:01:00 +00:00
Miles Malerba ebae211add feat(forms): introduce parse errors in signal forms
Parse errors allow a custom control to communicate that it is currently
unable to produce a valid value.

Parse errors are reported by implementing the optional `parseErrors`
property on the `FormUiControl`. The property should be a signal of the
current parse errors.

Also renames several `*Field` types to `*FieldTree`. This aligns with the new naming of the concept after `Field` was renamed
to `FieldTree`.
2026-01-22 22:19:10 +00:00
Angular Robot 085784e4f1 build: update all non-major dependencies
See associated pull request for more information.
2026-01-22 22:10:16 +00:00
Matthieu Riegler 145e77d09d build: Update prettier to 3.8
This version adds support for `angular-html` and `angular-ts` formatting in our markdown files.
2026-01-22 21:13:17 +00:00
Kristiyan Kostadinov dbc1452de3 refactor(compiler-cli): remove deprecated signature usage
The signature for `createImportClause` was deprecated in TS 5.9. These changes switch to the non-deprecated one.
2026-01-22 21:02:36 +00:00
kbrilla 5d6e534d8b build(language-service): upgrade LSP library to v9.0.1 (LSP 3.17)
Upgrade vscode-languageserver from 7.0.0 to 9.0.1 and related packages:
- vscode-jsonrpc: 6.0.0 → 8.2.0
- vscode-languageclient: 7.0.0 → 9.0.1
- vscode-languageserver-protocol: 3.16.0 → 3.17.5

This upgrade is required for LSP 3.17 features like Inlay Hints.

Breaking changes addressed:
- LanguageClient.start() now returns Promise<void> (no longer Disposable)
- LanguageClient.onReady() removed, await start() directly
- protocol2CodeConverter methods now return Promises (asWorkspaceEdit, asRanges)
- SignatureHelp.activeParameter: null → undefined
2026-01-22 19:55:53 +00:00
Andrew Scott 405fa59375 docs: release notes for the vscode extension 21.1.1 release (#66715) 2026-01-22 10:44:12 -08:00
Alon Mishne bfc2afdb5b release: cut the v21.2.0-next.0 release 2026-01-22 00:44:04 +00:00
Alon Mishne e35eea6e92 docs: release notes for the v21.1.1 release 2026-01-21 22:02:05 +00:00
Angular Robot 2c53243f00 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-21 12:44:18 -08:00
Matthieu Riegler 4ca2722d6f docs(docs-infra): fix regression on docs-tabs 2026-01-21 12:43:04 -08:00
Matthieu Riegler f0b1061791 docs(docs-infra): Handle additional description format
Ex: https://angular.dev/api/router/withExperimentalPlatformNavigation
2026-01-21 11:37:08 -08:00
Matthieu Riegler b885851cbe build: don't substitute binary files
Previously, ng_package applied version stamping to all source files, which corrupted binary files like SQLite databases.

This change ignores text substitution for files passed to the `data` attribute, ensuring binary assets are preserved intact in the final package.

fixes #66637
2026-01-21 10:35:04 -08:00
JoostK d94b19a92f fix(compiler-cli): drop .tsx extension for generated relative imports
When synthesizing an import corresponding with a .tsx file, the extension
would not be removed unlike regular .ts files. Adjust the import generators
to also drop any .tsx extension from module specifiers.

Closes #66262
2026-01-21 10:33:14 -08:00
aparziale 0fa8099d50 refactor: Delete counterproductive aria-label
Delete counterproductive aria-label in ADEV

fixes #66604
2026-01-21 10:25:35 -08:00
Shuaib Hasan Akib 1f86de019f docs: cleanup copy button and $ from output 2026-01-21 10:24:18 -08:00
Angular Robot 4df3a8bb36 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-21 10:22:12 -08:00
Angular Robot cb7ace96a4 build: update pnpm to v10.28.1
See associated pull request for more information.
2026-01-21 10:18:42 -08:00
Kristiyan Kostadinov 6bda88d203 refactor(compiler): use constants for parameter names
Uses the existing constant for `ctx` and `rf`, instead of hardcoding the strings in a few places.
2026-01-21 10:13:54 -08:00
Kristiyan Kostadinov b275206a49 fix(docs-infra): use focus-visible for focus styling
`focus-visible` should lead to a better experience, compared to showing the state on any focus.
2026-01-20 17:17:03 -08:00
Shuaib Hasan Akib 6284126da5 refactor(common): cleanup unused code in doc regions
Cleans unused imports and code
that is not referenced within the associated docregion blocks.
2026-01-20 16:31:10 -08:00
Kristiyan Kostadinov 94a8f797e5 fix(docs-infra): don't use private symbol
Fixes that the tab group was referring to a private symbol from the CDK.
2026-01-20 16:15:19 -08:00
Kristiyan Kostadinov 508d9c34d5 fix(docs-infra): use components directly
Switches the Material and CDK components to be used directly, instead of using the modules. This allows better diagnostics for unused directives.
2026-01-20 16:14:46 -08:00
Kristiyan Kostadinov e4c09776b0 refactor(compiler): remove unused symbols
Removes symbols that aren't used anymore from the identifiers map.
2026-01-20 16:14:16 -08:00
Kristiyan Kostadinov 094cdfe0b5 docs: fix serif font
Fixes some headers that were using a serif font unintentionally.
2026-01-20 16:12:46 -08:00
Andrew Scott ed78fa05c7 fix(core): Remove note to skip arrow functions in best practices
Arrow functions are now supported and this note is no longer needed
2026-01-20 10:42:42 -08:00
Matthieu Riegler 75c40e7ac7 ci: add template for vscode dedicated issues
We didn't have an entry since we migrated the vscode extension repo to the fw repo.
2026-01-20 10:23:57 -08:00
Kristiyan Kostadinov ce80136e7b fix(compiler): optimize away unnecessary restore/reset view calls
When producing a listener, the template pipeline does the following in separate phases:
1. Generates all the variables available within its scope.
2. Adds `restoreView` and `resetView` calls if there are any referenced to local variables (e.g. `@let` or local refs).
3. Optimizes away the variables that aren't used.

This means that we can end up in a situation where the references to the variables in the scope no longer exist, but we still enter and leave the view as if they're there which is unnecessary.

These changes add a simple optimization pass that looks specifically for the pattern of a `restoreView` followed by a `return resetView(expr)`. Furthermore, by changing the order of some optimizations, we're able to drop the `getCurrentView` variable as well.

Fixes #66286.
2026-01-20 10:22:55 -08:00
Andrew Scott 1cf1370568 refactor(language-server): split session into separate handlers
Breaks up the large session.ts file into separate handlers and consolidates the code related to completions in the server into the handler file
2026-01-20 10:22:12 -08:00
Leon Senft d0ba332292 refactor(forms): remove unused API
Remove `SubmittedStatus` which is no longer used.
2026-01-20 10:19:58 -08:00
hawkgs adae4c7ab0 refactor(devtools): use object-tree-explorer in signal-value-tree
Employ the reusable `object-tree-explorer` in the `signal-value-tree` preview component.
2026-01-20 10:16:54 -08:00
hawkgs 2d4262cfbd fix(devtools): support for @defer-only blocks; defer declared blocks (#66546)
Add support for `@defer`-only blocks (previously, they weren't rendered in the component tree at all); Fix declared blocks section in the details

PR Close #66546
2026-01-20 18:16:32 +00:00
hawkgs 92d2498910 feat(core): add host node to DeferBlockData (#66546)
Add the host/container comment node to the `DeferBlockData`. This node can be used as a `@defer` block locator in the DOM tree in the absence of root nodes.

PR Close #66546
2026-01-20 18:16:32 +00:00
SkyZeroZx 5dd17d7b81 docs: Update ngComponentOutlet binding and hydration note 2026-01-20 10:14:31 -08:00
SkyZeroZx 00455105cf docs(docs-infra): : Exempts animation-related symbols from linking
Exempts 'group()', 'keyframes', and '@keyframes' symbols from automatic linking.
2026-01-20 10:13:51 -08:00
SkyZeroZx 6f48b4f5ed docs: remove suffix in elements , templates , components & signals 2026-01-20 10:13:24 -08:00
Shuaib Hasan Akib 4adbc4fa19 refactor(forms): update Reactive Forms guide URL
Updates the Reactive Forms documentation link to the new `guide/forms/reactive-forms` path after the recent docs restructure.
2026-01-20 10:11:48 -08:00
Angular Robot fc73252287 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-01-20 10:02:53 -08:00
Joey Perrott a88f353a45 fix(docs-infra): support providing links to multiple symbols within a single line of a code block
Previously our system only found the first matching symboling to link to within a code block on each line, now we set up a link for all of the discovered symbols on each line

Fixes #65403
2026-01-20 09:35:33 -08:00
omar-almasry11 30b78bdc71 fix(docs-infra): improve skip-to-main-content method to focus <main> element instead of h1
Update the skip-to-main-content behavior to focus the <main> element when present, with a fallback to the first heading for legacy layouts without a main landmark.
2026-01-20 09:34:57 -08:00
Damian Sire 6dff1cf85d docs: fix spelling errors in documentation
Fix 6 spelling errors across documentation files:
- components-scenarios.md: 'recieved' → 'received', 'stubbe' → 'stubbed', 'controle' → 'control'
- overview.md: 'dependant' → 'dependent'
- creating-libraries.md: 'to to' → 'to'
- enter-and-leave.md: 'a an' → 'an'
2026-01-20 09:32:28 -08:00
Matthieu Riegler 2080dd1fec docs: Add mention of "documentation"
This should help to bring adev at the top when searching for "angular documentation" or "angular docs"
2026-01-20 09:31:38 -08:00
Maciej Ślusarz 8b9bdd0a63 docs: Fix typo in image loader step of Optimizing Images chapter 2026-01-20 09:30:43 -08:00
Angular Robot d50e971e98 build: lock file maintenance
See associated pull request for more information.
2026-01-20 09:28:18 -08:00
Jessica Janiuk 5d46554e3f docs: Add section on animate.leave for clarity
There has been a bunch of confusion as to how `animate.leave` works on child nodes when the non-animated parent is removed. This section addition should clarify that.
2026-01-16 13:26:45 -08:00
SkyZeroZx 95c386469c feat(forms): Add passing focus options to form field
Extends the `focus` method of form fields and custom controls to accept and propagate `FocusOptions`.

This enables developers to control focus behavior more precisely, for example, preventing scrolling when focusing an element.
2026-01-16 13:24:27 -08:00
Jessica Janiuk e55260f693 build: update lock file
This updates the lock file. Surprise!
2026-01-16 11:07:02 -08:00
Angular Robot 9989c5fb78 build: update dependency @csstools/css-color-parser to v4
See associated pull request for more information.
2026-01-16 10:30:20 -08:00
Angular Robot 4bb5774f3b build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-16 10:25:04 -08:00
Kristiyan Kostadinov 52bc0208f9 build: move zone.js build off deprecated flag
The Zone.js build was depending on the `--outFile` flag from TypeScript which is deprecated. These changes switch to using `--outDir` and copying the files out of the directory instead.
2026-01-16 09:28:47 -08:00
Miles Malerba e7b2dde6d1 fix(forms): fix control value syncing on touch
Previously we were unconditionally setting the control value back into
the value, regardless of if it had actually been changed. This PR
changes the logic to flush the pending sync on touch if there is one, or
just skip it if there isn't.
2026-01-16 09:25:27 -08:00
Angular Robot 54fc393d27 build: update dependency @csstools/css-calc to v3
See associated pull request for more information.
2026-01-16 09:20:05 -08:00
Kristiyan Kostadinov d9c980a958 build: initial test of TypeScript 6
Resolves some initial test failures after updating to TypeScript 6.
2026-01-15 13:41:01 -08:00
Kristiyan Kostadinov 4831a9f676 fix(core): handle Set in class bindings
Currently migrating from `[ngClass]` to `[class]` isn't entirely supported, because `[ngClass]` supports `Set` values while `[class]` ignores them.

These changes add a bit of logic to bring them closer together and make the migration easier.
2026-01-15 13:39:59 -08:00
Jeevan Mahesha 417c385ddc docs: update directive name from [field] to [formField] in signal-forms documentation 2026-01-15 11:41:02 -08:00
hawkgs 87f4797321 refactor(devtools): drop dagre graph type
Drop Dagre graph type since v7.0.14 introduces better typing.
2026-01-15 11:11:03 -08:00
hawkgs 721094788a refactor(devtools): snap to root node on signal graph render
Drop the old `ResizeObserver` and resize logic in favor of a simpler "snap to root node" (template or first node) functionality.
2026-01-15 11:10:26 -08:00
Alan Agius c7eee8300f docs: clarify that FESM can depend on shared chunks
Closes #66569
2026-01-15 11:05:41 -08:00
Miles Malerba 5974cd0afc feat(forms): Ability to manually register a form field binding in signal forms
This PR adds the ability to manually register a binding with the
`FormField` directive. This is useful for a lower-level implementation
that takes the field tree as an `input()` rather than relying on the
automatic binding from `FormUiControl`.
2026-01-15 11:03:28 -08:00
Joey Perrott f2cf96b519 fix(docs-infra): use public folder instead of assets folder for static files in adev tutorials
Use public folder rather than assets folder after the change in angular-cli's defaults for angular.json

Fixes #58981
2026-01-15 10:59:25 -08:00
Angular Robot 849b8401a0 build: update github/codeql-action action to v4.31.10
See associated pull request for more information.
2026-01-15 10:57:15 -08:00
Angular Robot 22fefe7880 build: update bazel dependencies
See associated pull request for more information.
2026-01-15 10:54:25 -08:00
Angular Robot ebc52ff434 build: update all non-major dependencies
See associated pull request for more information.
2026-01-15 10:52:48 -08:00
Matthieu Riegler a792315f09 docs(docs-infra): prevent heading from linking symbols 2026-01-15 08:59:14 -08:00
Doug Parker 61614f6caa release: bump Angular DevTools version to 1.8.0 2026-01-14 14:14:04 -08:00
Angular Robot fa4bcf12cd build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-14 12:20:48 -08:00
Jessica Janiuk 0159268971 docs: release notes for the v21.1.0 release 2026-01-14 11:46:05 -08:00
Jessica Janiuk d12e6f0986 docs: release notes for the v21.0.9 release 2026-01-14 11:31:53 -08:00
Joey Perrott 3f13db87e2 ci: update algolia synonym updater to use node directly rather than tsx
With new version of node we can import ts files directly in our scripts rather than using tsx
2026-01-14 09:26:40 -08:00
SkyZeroZx 724e917f7a docs(docs-infra): Exempts animation-related symbols from linking
Exempts 'animation', 'transition', and 'trigger' symbols from automatic linking.
2026-01-14 08:24:48 -08:00
Angular Robot 230e16d3a5 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-14 08:23:05 -08:00
Shuaib Hasan Akib c9f584b918 docs: add IMPORTANT prefix to pipe usage warning and
Adds an IMPORTANT label to emphasize the guidance about avoiding impure
pipes due to potential performance impact.
2026-01-14 08:10:59 -08:00
Younes Jaaidi a904d9f77b fix(compiler-cli): support nested component declaration
```ts
@Component(...)
class Outer {
  constructor() {
    @Component(...)
    class Inner {}
  }
}
```

previous behavior was that IVy transformation was only applied to `Inner`, thus breaking `Outer` transformation.
2026-01-14 08:10:34 -08:00
Jessica Janiuk e673eb6df2 Revert "refactor(core): remove ng when invoking enableProdMode"
This reverts commit cb5879f566.
2026-01-14 08:08:58 -08:00
SkyZeroZx 074666b2e8 docs(docs-infra): use Signals Forms focusBoundControl
Removes direct `ViewChild` access from `TextField` components and relies on
Signals Forms via the `focusBoundControl`  to manage focus.
2026-01-14 08:00:45 -08:00
Angular Robot 4c2d860c5f build: update dependency node to v22.22.0
See associated pull request for more information.
2026-01-14 07:57:59 -08:00
Angular Robot 551f120530 build: update dependency bazel to v8.5.1
See associated pull request for more information.
2026-01-14 07:57:34 -08:00
Alan Agius 710a4bf02b fix(docs-infra): remove trailing slash from sitemap URLs
Fixes an issue where a trailing slash was sometimes added to the end of URLs in the sitemap, causing unnecessary redirects.

Example of problematic URL:
```xml
<loc>https://angular.dev/</loc>
```
2026-01-14 07:57:09 -08:00
Alan Agius 95e8c2fdee build: remove tsx dependency and update release script to use node directly
Node.js can run typescript directly.
2026-01-14 07:56:38 -08:00
Andrew Scott 227acddd3a build: Update vscode release script
- Ensure there is a GITHUB_TOKEN environment variable at the start so we can push the release
- More robust handling for finding releaser's fork if it's not 'origin'
2026-01-13 13:08:26 -08:00
Matthieu Riegler cb5879f566 refactor(core): remove ng when invoking enableProdMode
This was caught while investigating a leak.
2026-01-13 11:39:48 -08:00
Andrew Scott 029685bd93 build: update cherrypick changelog to stash
there are often some formatting/newline changes caused by other steps. just stash anything
2026-01-13 11:20:16 -08:00
Kristiyan Kostadinov b95753eb7d fix(vscode-extension): add syntax highlighting for arrow functions
Updates the syntax definition to handle arrow functions. The definition is largely based on TypeScript's own syntax highlighting since it's quite complex.
2026-01-13 11:09:26 -08:00
Kristiyan Kostadinov c70a6a6ecc fix(vscode-extension): add syntax highlighting for spread/rest expressions
Updates the syntax definition to include spread/rest expressions.
2026-01-13 11:09:26 -08:00
Andrew Scott e45f8afdab docs: release notes for the vscode extension 21.1.0 release 2026-01-13 11:09:05 -08:00
Jeremy Elbourn 871fa1b2dd docs: update OnChanges API reference w/ signal input
We had some reports of LLMs claiming that `ngOnChanges` does not include
changes for signal-based inputs. This is wrong (and the LLMs just made
it up), but we can update the docs at least to demonstrate `ngOnChanges`
with signal-based inputs.

Previously, the API reference used a real test as a code example, but
updating the test to a signal-based input is more involved than this
change needs to call for.
2026-01-13 09:04:24 -08:00
Angular Robot 6e6a02206c build: lock file maintenance
See associated pull request for more information.
2026-01-13 08:55:56 -08:00
Angular Robot 951671ab09 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-01-13 08:54:57 -08:00
Alan Agius e8f8ac20d6 build: remove @angular-devkit/architect-cli from dev dependencies
This dependency is not used.
2026-01-13 08:33:52 -08:00
Matthieu Riegler 72534e2a34 feat(compiler): Add support for the instanceof binary operator
Because why not ?

fixes #59975
2026-01-13 08:33:12 -08:00
Georgi Serev 9273f1c3c2 feat(devtools): add resource visualization to the signal graph
Convert the signal graph to a Devtools-FE-specific signal graph that supports clusters; Add support for `resource` clusters; Introduce some improvements to the signal graph viz
2026-01-13 08:32:46 -08:00
lyutails 910768f5cc docs: update hierarchical-dependency-injection.md
VillainsService highly likely misspelled and then written as VillainService with 's' missing
2026-01-13 08:31:41 -08:00
Alan Agius 6e82167481 ci: update Renovate configuration to replace Bazel module dependency command
This uses `ng-dev misc sync-module-bazel`, add `MODULE.bazel` to file filters, and remove specific dependency name matching.
2026-01-13 08:28:43 -08:00
Andrew Scott 69da6390b1 build: improve changelog generation and tag fetching in release script
- Fetch tags explicitly to ensure local availability.
- Implement `getPreviousTag` to reliably determine the base for changelog generation, falling back to the latest `vsix-*` tag if the specific previous version tag is missing.
- Filter changelog commits by subject to exclude duplicates (e.g. cherry-picks) that are already present in the previous release history but have different hashes.
2026-01-12 16:06:35 -08:00
Andrew Scott 78755771e1 build: fix changelog generation for last rev
updates changelog generation to work when releasing the first final
version.
2026-01-12 14:53:20 -08:00
SkyZeroZx 36c2f4b6f9 docs(docs-infra): replace deprecated Router.isActive with isActive (#66430)
Updates the view transition logic to use the isActive function instead of the deprecated Router.isActive

PR Close #66430
2026-01-12 22:42:32 +00:00
SkyZeroZx a39e3fdabe docs: update examples to use isActive instead of deprecated Router.isActive (#66430)
PR Close #66430
2026-01-12 22:42:32 +00:00
Andrew Scott e8c44a00f9 refactor(router): Retain original navigateEvent across redirects
This builds off of #66197 by retaining the original navigateEvent across redirects
so the NavigateEvent can more accurately track the lifecycle of a navigation,
which may span across several NavigationStart events due to redirects
2026-01-12 14:41:54 -08:00
Andrew Scott e34365cfd5 build: use tsx for release script
I otherwise get Unknown file extension ".mts". using tsx fixes it for me
2026-01-12 14:41:14 -08:00
Alex Rickabaugh 1ba9b7ac50 feat(core): resource composition via snapshots
* Define `ResourceSnapshot<T>` as a type union of possible states for a
`Resource<T>`.
* Add `Resource.snapshot()` to convert a `Resource` to a signal of its
  snapshot.
* Add `resourceFromSnapshots` to convert a reactive snapshot back into a
  `Resource`.

By converting resources from/to `Signal<ResourceSnapshot>`s, full
composition of resources is now possible on top of signal composition APIs
like `computed` and `linkedSignal`.

For example, a common feature request is to have a `Resource` which retains
its value when its reactive source (params) changes. This can now be built
as a utility, leveraging `linkedSignal`'s previous value capability:

```ts
function withPreviousValue<T>(input: Resource<T>): Resource<T> {
  const derived = linkedSignal({
    source: input.snapshot,
    computation: (snap, previous) => {
      if (snap.status === 'loading' && previous?.value) {
        // When the input resource enters loading state, we keep the value
        // from its previous state, if any.
        return {status: 'loading', value: previous.value.value};
      }

      // Otherwise we simply forward the state of the input resource.
      return snap;
    },
  });

  return resourceFromSnapshots(derived);
}

// In application code:

userId = input.required<number>();
user = withPreviousValue(httpResource(() => `/user/{this.userId()}`));
// if `userId()` switches, `user.value()` will keep the old value until
// the new one is ready!
```
2026-01-12 13:49:56 -08:00
Matthieu Riegler 65fa5b5439 fix(forms): Ensure the control instruction comes after the other bindings
Prior to this change, binding to radio value was sensitive to the order in which `value` & `formField` where binding in the template.
The compiler change makes that order non-important.

fixes #66402
2026-01-12 13:49:19 -08:00
cexbrayat 7fd076bdd3 test(forms): improve test coverage for multiple pattern validators
Add comprehensive test cases to validate behavior when multiple
pattern validators are applied to the same field.

These tests clarify that multiple patterns operate with AND logic,
where each pattern is validated independently and produces its own
error when it doesn't match.
2026-01-12 13:48:16 -08:00
Shuaib Hasan Akib 1b4dcc01ff docs: replace old https://angular.io/license with https://angular.dev/license 2026-01-12 13:41:30 -08:00
Andrew Scott ebc90c26f5 feat(language-server): Add completions and hover info for inline styles
This adds completions for inline styles, using the SCSS language service

resolves #65489
2026-01-12 13:40:37 -08:00
Andrew Scott 573aadef7e feat(language-server): Add quick info for inline styles
This adds quick info to the langauge server for inline styles using the
scss language service.
2026-01-12 13:40:37 -08:00
Andrew Scott 26fd0839c3 feat(language-server): Add folding range support for inline styles
Adds folding range support for inline styles to the language server
2026-01-12 13:40:37 -08:00
Mikhail Efanov 27276374ab build: update dev container configuration
build: update dev container configuration

build: update dev container configuration

Update dev container configuration files to support latest environment.
- Use customizations.vscode structure instead of deprecated extensions property.
- Update bazel extension to BazelBuild.vscode-bazel.
- Ignore .pnpm-store directory.
- Update ports list
- Use forwardPorts instead appPort

Document the usage of Dev Containers in building-and-testing-angular.md.
2026-01-12 13:39:29 -08:00
Shuaib Hasan Akib f53f878e0f fix(docs-infra): use margin instead of padding to prevent heading hover overflow
Replaced padding-block-start with margin-block-start on
.docs-reference-section-heading to prevent anchor hover and click areas from extending into empty space above the heading. This ensures hover behavior aligns with the visible text.
2026-01-12 13:38:46 -08:00
Matthieu Riegler c09f5352f6 docs(docs-infra): Throw build error on invalid guide links
The list of valid links is generated from navigation data configuration in the ADEV app.
Redirections are knowingly exclude so we stop referencing them.
2026-01-12 13:38:20 -08:00
Shuaib Hasan Akib 8bdd98ef41 fix(docs-infra): prevent duplicate description rendering for block API entries
Block entries (@if, @defer, @for,@let, @switch) were falling back to the generic
DocsReference template, causing the description to appear twice - once in
the header section and once in the main content area.

This commit adds a dedicated rendering path for block entries:
- Creates BlockEntryRenderable type and associated transforms
- Adds BlockReference template that uses RawHtml directly
- Modifies HeaderApi to accept hideDescription prop
- Updates processing and rendering pipelines to handle blocks

The fix ensures block documentation displays only one description section
while preserving the existing behavior for all other API entry types.

Update adev/shared-docs/pipeline/api-gen/rendering/transforms/block-transforms.mts

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2026-01-12 13:37:54 -08:00
Roshith 933ca9e5dc docs: fix spelling mistake in documentation
correct typo where "youself" was written instead of "yourself"
2026-01-12 13:36:56 -08:00
Joey Perrott 4d6a6aafee build: begin requring usage of release mode for releases
Start requiring the usage of the release merge-mode for allowing releases to be made from the repository
2026-01-12 13:36:19 -08:00
Angular Robot 4a76058baf build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-12 13:35:19 -08:00
Angelo Parziale 4d983e9904 build(docs-infra): Update dependency @xterm/xterm to v6
Update dependency @xterm/xterm to v6 and fix style
2026-01-12 10:16:24 -08:00
SkyZeroZx 511d9ca9d2 docs: remove Component suffix in animations, HTTP, and SSR guides
Removes the unnecessary `Component` suffix from examples.
Also fixes button styling in the animations examples, which previously did not render correctly in dark mode.
2026-01-12 10:07:05 -08:00
Shuaib Hasan Akib c63bc58e0f docs: correct line number highlighting in query examples
Updates incorrect highlighted line numbers so they match the intended
code being referenced in the documentation.
2026-01-12 10:04:14 -08:00
SkyZeroZx e38c1bf743 refactor(http): remove redundant providedIn: 'root' in XSRF_HEADER_NAME
Removes unnecessary `providedIn: 'root'` declarations from injection token
2026-01-12 10:00:24 -08:00
SkyZeroZx fa6e82b569 refactor(core): Add missing OnDestroy to zone and zoneless change detection schedulers
Implements the OnDestroy interface in NgZoneChangeDetectionScheduler and ChangeDetectionSchedulerImpl
2026-01-12 10:00:24 -08:00
Miles Malerba 10e9022a07 feat(forms): allow focusing bound control from field state
Allows focusing the assocated bound control from the `FieldState`.
2026-01-12 09:59:42 -08:00
Matthieu Riegler b22835579e docs(docs-infra): prevent from showing duplicate usage blocks in functions API docs
fixes #66398
2026-01-12 09:50:12 -08:00
Matthieu Riegler a056413520 docs(docs-infra): Show API decorators docs
fixes #66129
2026-01-12 09:41:25 -08:00
Matthieu Riegler 33b2d9905d docs(docs-infra): Add community russian translation
fixes #65720
2026-01-12 09:40:06 -08:00
Matthieu Riegler ad699cebb5 docs: change language section to "community translations" 2026-01-12 09:30:18 -08:00
Andrew Scott 89d47d814d refactor(router): Change RouterLink internals to use signals
This simplifies some of the internals of RouterLink because signals do
the heavy lifting of determining when things have changed
2026-01-12 08:56:32 -08:00
Angular Robot 460c1c7e71 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-12 08:55:15 -08:00
omar-almasry11 405b05607c fix(docs-infra): improve symbolic green contrast for WCAG compliance
Adjusts the symbolic green color to meet WCAG contrast requirements in documentation styles.
2026-01-12 08:50:33 -08:00
Jeevan Mahesha 66b40d4fb3 docs: update testing guide to include Vitest and improve authGuard test setup 2026-01-12 08:32:11 -08:00
Angular Robot 783f20edbc build: update pnpm to v10.28.0
See associated pull request for more information.
2026-01-12 08:31:45 -08:00
Matthieu Riegler 7f1b790f84 docs: improve separation between enter and leave example
fixes #66359
2026-01-12 08:18:16 -08:00
Kristiyan Kostadinov f0dba6deb9 build: update license for vscode extension
The vscode extension still has the old license headers pointing pointing to AIO.
2026-01-12 08:17:39 -08:00
aparziale e7f24014cf docs(docs-infra): Angular Aria listbox shows placeholder for "Selection modes"
Improved documentation for the aria listbox component. Added an example comparing selectionMode input.

Fixes: #65682
2026-01-12 08:17:11 -08:00
Angular Robot 9333751525 build: update dependency @actions/github to v7
See associated pull request for more information.
2026-01-12 08:16:24 -08:00
Angular Robot f34eb65f89 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-12 08:15:55 -08:00
SkyZeroZx 0aaadafc50 refactor(compiler-cli): update error message links to versioned docs (#66374)
Error message links now point to the archived documentation site (v*.angular.dev)
so that referenced content matches the framework version in use.

See angular#44650

PR Close #66374
2026-01-09 22:33:51 +00:00
SkyZeroZx f4469ad583 refactor(core): update error message links to versioned docs (#66374)
Error message links now point to the archived documentation site (v*.angular.dev)
so that referenced content matches the framework version in use.

See angular#44650

PR Close #66374
2026-01-09 22:33:51 +00:00
Miles Malerba 5671f2cc07 fix(forms): Rename signal form [field] to [formField]
This completes the rename started in #66136. `[field]` is too generic of
a selector for the forms system to own, and likely to cause naming
collisions with existing components. Therefore it is being renamed to
`[formField]`
2026-01-09 14:33:09 -08:00
tomer953 008e20ca56 fix(migrations): prevent duplicate imports in common-to-standalone migration
The common-to-standalone migration did not check for existing imports
when adding needed imports after removing CommonModule. This change adds deduplication
logic to filter out imports that already exist in the imports array
before adding them, ensuring each import appears only once.
2026-01-09 14:30:47 -08:00
Angular Robot 5c16caa95e build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-09 11:26:15 -08:00
Alan Agius 99db2e9065 ci: add pnpm and typescript exclusions to a Renovate package rule.
This will be handled in dev-infra preset, see: https://github.com/angular/dev-infra/pull/3340
2026-01-09 10:41:54 -08:00
Kristiyan Kostadinov 7b5625e72a refactor(compiler): isolate arrow function processing
Isolates the logic that fixes references to arrow function parameters so that we don't have do pass extra parameters for every `convertAst` call.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov 4cf1a92288 refactor(compiler): rework arrow function storage
Reworks how we store arrow functions in the following ways:
1. Rather than the `storeCallback` and `getCallback` instructions, we generate a single `arrowFunction` instruction.
2. The `arrowFunction` instruction uses a factory to create a new instance of the function when a function is read for the first time.
3. We now keep arrow functions in listeners in line so that they have access to `$event`.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov d9923b72a2 feat(core): support arrow functions in expressions
Adds support for using arrow functions in Angular expressions. They generally behave like JS arrow functions with the same access as other Angular expressions, but with the following limitations:
* We only support arrow functions with implicit returns, e.g. `(a) => a + 1` is allowed while `(a) => { return a + 1 }` is not.
* Pipes can't be used inside arrow functions, but they can be passed through to pipes.

To avoid recreating the functions in each change detection, the compiler applies a couple of optimizations:
* If an arrow function only references its own parameters, it is extracted into a top-level constant that is passed around to the different usage sites.
* If an arrow function has references to the template context, we store it on the current view and read the stored value later on.

Fixes #14129.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov 3242a61bae fix(compiler): variable counter visiting some expressions twice
The `countVariables` phase visits all ops in the list and all nested expressions in order to count how many variables are used. Currently it does so by going through `unit.ops()` and then calling `visitExpressionsInOp` on each op.

This leads to expressions in ops that have nested ops (e.g. `ListenerOp`) to be visited twice, because `unit.ops()` descends into child ops and then `visitExpressionsInOp` does the same. It hasn't been a problem so far, because the only expressions that can have vars in host bindings are pure functions and they aren't generated for listeners, but it will become a problem for arrow functions since they can be used in listeners.

These changes resolve the issue by iterating over the `unit.create` and `unit.update` instead.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov 17733b70a3 refactor(core): add instructions for callback storage and retrieval
Adds the `ɵɵstoreCallback` instruction that allows for a callback to be stored for later usage, as well as `ɵɵgetCallback` which can be used to retrieve it.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov 87a422358b refactor(compiler-cli): template type checking support for arrow functions
Updates the template type checker to support arrow functions. The main challenge was getting the current infrastructure not to rewrite references to arrow function parameters.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov f05d08f432 refactor(compiler): add arrow function parsing
Updates the expression parser to handle arrow functions. Since arrow functions share syntax with other AST nodes, we have to detect them by looking ahead and then potentially jumping backwards depending on what we see.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov ab536f8f32 refactor(compiler): add AST nodes for arrow functions
Expands the expression AST to include arrow functions.
2026-01-09 10:35:37 -08:00
Kristiyan Kostadinov d01e54dea4 refactor(compiler): tokenize =>
Adds some logic to tokenize the `=>` character combination in the lexer.
2026-01-09 10:35:37 -08:00
Andrew Scott da364d2635 refactor(router): Add support for precommitHandler in Navigation integration
The `precommitHandler` of the Navigation API unlocks some of the truly
powerful features for Routers like Angular's which defer the URL
updates. Without the `precommitHandler`, we cannot initiate a navigation
until we are ready to commit the URL because it causes the URL to update
immediately.

With `precommitHandler` support, we are able to create a `NavigateEvent`
_immediately_ on navigation, which allows the browser to show that a
navigation is happening with a loading indicator. Site visitors will
also have the ability to cancel the navigation with the "stop" button.
When we are ready to commit the URL, the precommitHandler supports a
"redirect" function that we can use to first redirect the navigation to
a new location immediately before committing it.

The commit operation is not synchronous because the API waits for all
precommitHandlers to resolve. This commit adds a small bit of handling
to account for this so that the Router's transition does not advance
to the next stage until the URL has been committed.
2026-01-09 10:31:26 -08:00
fisker 4fb24cadee refactor(compiler): switch Binary.isAssignmentOperation to type guard function
Improve `Binary.isAssignmentOperation` types
2026-01-09 09:59:29 -08:00
Angular Robot ac865b51f7 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-09 09:55:40 -08:00
SkyZeroZx 94b707957a docs(docs-infra): avoid persistent AbortSignal listener in wait debounce in search
Cleans up the abort listener once the timeout resolves to prevent it from
remaining attached longer than necessary.
2026-01-09 09:38:07 -08:00
Yahya-Almubarak e3b3290998 docs: replace UnambiguousRoleValidator in asyc-valdotors part form-validation.md
The async validators part of document uses uniqueRoleValidator and not UnambiguousRoleValidator.
2026-01-09 09:26:18 -08:00
Devin Chasanoff 09234753e1 docs: add ai tutor signal forms docs 2026-01-09 09:25:38 -08:00
Angular Robot e6a8bb81f9 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-09 09:05:18 -08:00
kirjs 7d985ce08e docs(forms): Clarify returning errors from submit functions
Update outdate comment, and add a section to the docs
2026-01-09 08:47:42 -08:00
fisker a7e470a1b3 refactor(compiler): tighten Unary.operator type
Improve `Unary.operator` type
2026-01-09 08:47:01 -08:00
fisker 4d19408e9b refactor: _ParseAST.isAssignmentOperator to type guard
Update `_ParseAST.isAssignmentOperator` to type guard
2026-01-09 08:45:35 -08:00
fisker 07a08ab9f8 refactor(compiler): tighten Binary.operation type
Improve `Binary.operation` types
2026-01-09 08:45:35 -08:00
fisker 04ba09a8d9 feat(compiler): support AstVisitor.visitEmptyExpr()
Add support for `AstVisitor.visitEmptyExpr()`
2026-01-09 08:45:12 -08:00
hawkgs e66aeac8d0 refactor(devtools): style the profiler dialogs to match the current design
Decrease the font size and tone down the paddings and margins. Use `ng-button` instead of `mat-button`.
2026-01-09 08:23:18 -08:00
hawkgs bea5840864 refactor(devtools): add secondary type button
Add a secondary style/type button to `ng-button`.
2026-01-09 08:23:18 -08:00
SkyZeroZx 3a65814f53 docs(docs-infra): improve label fallback logic in search results
Improves label fallback in search results by providing a fallback to the top-level category when a more specific label is missing.
2026-01-09 07:58:33 -08:00
SkyZeroZx 0d35088b56 docs: add docs support for spread and rest operators in expression syntax 2026-01-09 07:58:07 -08:00
Angular Robot 3ccd5a4354 build: update cross-repo angular dependencies to v21.1.0-next.4
See associated pull request for more information.
2026-01-09 07:49:52 -08:00
Alon Mishne c963f35d2c docs: Updated MCP docs to include latest experimental tools and recent renames 2026-01-09 07:48:22 -08:00
Matthieu Riegler 80a7419a16 Revert "docs: remove incorrectly listed operators in "Supported operators" table (Expression Syntax Guide) (#62092)"
This reverts commit ea71a1e8cd.
2026-01-09 07:47:49 -08:00
Andrew Scott 49295778bc refactor(core): Use the provided Document value rather than global in FakeNavigation
This commit ensures the Document used by `FakeNavigation` is the one
passed in the constructor rather than the global `document`, which may
be different.
2026-01-08 13:28:18 -08:00
Andrew Scott 473dd3e1cb fix(compiler-cli): attach source spans to object literal keys in TCB
Previously, object literal keys in the TCB did not have source spans attached. This made it difficult for the Language Service to distinguish between keys and values, leading to incorrect completion contexts and diagnostic locations.

This commit ensures that source spans are properly attached to the keys in the TCB.
2026-01-08 13:27:08 -08:00
Angular Robot 00905c1c03 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-08 13:26:26 -08:00
Jessica Janiuk 9529362617 docs: release notes for the v21.1.0-rc.0 release 2026-01-08 12:52:40 -08:00
Jessica Janiuk e005eb4e66 release: bump the next branch to v21.2.0-next.0 2026-01-08 12:52:40 -08:00
Jessica Janiuk 3b8c4fc136 docs: release notes for the v21.0.8 release 2026-01-08 12:44:14 -08:00
Jessica Janiuk a2b9429992 Revert "feat(router): add trailingSlash config option"
This reverts commit 12fccc5e99.
2026-01-08 12:20:03 -08:00
Andrew Scott 86dc1283e8 fix(core): handle cancelled traversals in fake navigation
Update fake navigation implementation to correctly handle traversals that are cancelled (e.g. by a precommit handler).
Ensure prospective index is calculated correctly so that subsequent traversals target the correct entry.
Add regression test for cancelled traversals.
2026-01-08 11:27:37 -08:00
omar-almasry11 ad49d489ae fix(docs-infra): improve dark mode button hover contrast for WCAG compliance
The .docs-primary-btn hover state in dark mode had a contrast ratio of 2.18:1,
failing WCAG 2.1 SC 1.4.3. This change reuses the existing
--hot-pink-to-electric-violet-radial-gradient to achieve 4.5:1+ contrast.
2026-01-08 11:21:23 -08:00
Angular Robot 50ded69afb build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-08 11:17:03 -08:00
zakaria-bali bd5997cfeb docs(forms): make onSubmit method async for form submission
Change onSubmit method to be asynchronous since we are using await inside it
2026-01-08 10:03:23 -08:00
lyutails 8fad6155b2 docs: fix typo in effect.md 2026-01-08 10:02:51 -08:00
aparziale 71149ef57a docs(docs-infra): Fix toggle button in dark mode
Fix visibility toggle button in dark mode

Fix #66049
2026-01-08 09:07:56 -08:00
Angular Robot adabdcd173 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-08 08:43:27 -08:00
Angular Robot 7d3cf91b1e build: update all non-major dependencies
See associated pull request for more information.
2026-01-08 08:41:30 -08:00
Shuaib Hasan Akib f727f8e655 docs: fix broken anchor link for Angular versioning section
Updates the release documentation link to point to the correct `#angular-versioning` anchor so readers are directed to the intended
2026-01-08 08:35:30 -08:00
Matthieu Riegler 8bc688b56f docs: add release schedule 2026-01-08 08:34:47 -08:00
Andrew Scott 12fccc5e99 feat(router): add trailingSlash config option
This commit introduces a highly requested `trailingSlash` configuration option to the Angular Router, allowing developers to control how trailing slashes are handled in their applications. The options are:
- 'always': Enforces a trailing slash on all URLs.
- 'never': Removes trailing slashes from all URLs (default).
- 'preserve': Respects the presence or absence of a trailing slash as defined in the UrlTree.
2026-01-08 08:26:37 -08:00
Matthieu Riegler d100e691d8 refactor(core): extend tests for empty cases.
follow-up of #66372 to extend a bit our runtime test coverage for empty cases
2026-01-08 08:24:53 -08:00
Andrew Scott 7003e8d241 feat(router): Publish Router's integration with platform Navigation API as experimental
This publishes the work that was done to integrate with the Navigation
API as an experimental router feature. Browser support is limited and in
active development. There are also known bugs in the browser implementations
and only Chromium browsers supported deferred URL updates with the
`precommitHandler`. Relates to #53321, which I would likely not mark as
completed until this is at least in dev preview, which likely won't
happen until it is widely available and potentially delayed until
`precommitHandler` is widely available as well.

The final form of this api might not even be a "router feature" in the end, but instead be
something similar to what other frameworks have to provide different
platform integrations (e.g. `provideNavigationRouter`). That would
support omitting the history-based integration from the bundle when only
the navigation integration is used. Alternatively, the current
`provideRouter` could require one of `withHistory` or `withPlatformNavigation`.
2026-01-07 16:16:06 -08:00
Matthieu Riegler 0ad3adc7c6 fix(compiler): Support empty cases
Before this commit empty @cases ended up being interpreted as consecutive cases.
2026-01-07 15:47:59 -08:00
cexbrayat bb0dc8c4e0 refactor(core): typo in stability debugging warning message
untility -> utility
2026-01-07 14:44:06 -08:00
Jaime Burgos 5c75d29fb4 refactor(core): Improve tree-shakable RuntimeError error for INVALID_FIELD_DIRECTIVE_HOST
Improves the tree-shakable runtime error handling for `INVALID_FIELD_DIRECTIVE_HOST`.
2026-01-07 14:32:25 -08:00
Andrew Scott 50674f8c28 fix(vscode-extension): convert enum member kind in completions correctly
This converts enum member kinds to the correct completion kind for displa in the completions popup
2026-01-07 14:30:05 -08:00
Jan Martin 4f785f4ab1 refactor(devtools): make release script compatible with type stripping
When running this script with node directly, it requires explicit markers
for type-only imports to work.
2026-01-07 14:28:17 -08:00
Jessica Janiuk 30e9c62bdf fix(core): fix memory leak with event replay
This ensures event replay does not hold on to elements after an application has been destroyed.

fixes: #59261
2026-01-07 14:27:44 -08:00
kirjs af4e521d64 docs: release notes for the v20.3.16 release 2026-01-07 17:20:01 -05:00
kirjs f8db6ad3b1 docs: release notes for the v19.2.18 release 2026-01-07 17:14:07 -05:00
kirjs 414b647897 docs: release notes for the v21.0.7 release 2026-01-07 16:48:40 -05:00
Jan Martin 2c9328639f release: bump Angular DevTools version to 1.7.0 2026-01-07 13:28:29 -08:00
Matthieu Riegler 18810d8a15 build: update lock file maintenance
superseeds #66229

This also removes the dagre-d3-es patch as it was merged upstream (tbo47/dagre-es/pull/51)
2026-01-07 15:53:37 -05:00
Leon Senft 46dbd18566 refactor(forms): remove customError()
Remove the `customError` function and `CustomValidationError` type.

These were made obsolete by support for returning plain object literals
as custom errors.

This also catches few `field` properties that were missed in the
renaming to `fieldTree`.
2026-01-07 15:07:30 -05:00
arturovt 9e043decaf fix(router): handle errors from view transition updateCallbackDone promise
Firefox-specific workaround: Firefox 144+ creates the `updateCallbackDone` promise
internally during error handling (e.g., duplicate view-transition-name), even before
the property is accessed. This can cause unhandled promise rejections to appear in
error tracking tools like Rollbar/Sentry. We must attach catch handlers to all three
promises immediately to prevent these unhandled rejections.
See: https://bugzilla.mozilla.org/show_bug.cgi?id=1999336 (if applicable)
Spec: https://drafts.csswg.org/css-view-transitions-1/#dom-viewtransition-updatecallbackdone
2026-01-07 15:05:59 -05:00
Kristiyan Kostadinov 4dc5ae54a9 refactor(core): remove unused instruction parameter
The `thisArg` in pure functions isn't used so we can drop it. We still need to keep it on the underlying implementation, because pipe instructions rely on it.
2026-01-07 15:05:20 -05:00
SkyZeroZx 090484c853 docs(docs-infra): Fix combobox dialog styles for dark theme
Fixes combobox dialog styles to ensure correct text color and contrast in dark theme.
This improves readability and visual consistency when using the docs in dark mode.
2026-01-07 14:19:32 -05:00
SkyZeroZx f9e9fc4ffe docs: enhance programmatic rendering guide by covering ngComponentOutlet options 2026-01-07 14:18:33 -05:00
Shuaib Hasan Akib d129d201c1 docs: standardize component decorator placeholders in markdown
Updates `@Component({ ... })` to `@Component({/*...*/})` across
documentation examples for consistency and clearer formatting.
2026-01-07 14:17:38 -05:00
SkyZeroZx 8c8c5b24a1 docs(vscode-extension): update angular.io links to angular.dev in messages 2026-01-07 14:12:15 -05:00
SkyZeroZx b2f417585a docs: update angular.io links to angular.dev in comments, TSDoc, and warnings 2026-01-07 14:12:15 -05:00
Andrew Scott bcef77d950 fix(router): Fix RouterLink href not updating with queryParamsHandling
There was a bug introduced in #60875. While RouterLink doesn't
necessarily depend on Router state, its link can change when navigations
cause the `ActivatedRoute` paths to change. It is difficult to determine
which segments the link depends on. Luckily, the commit had flawed
logic:

```
!this.queryParamsHandling && !dependsOnRouterState(this.options?.defaultQueryParamsHandling);
```

The subscription gets created whenever `queryParamsHandling` was not
defined, or it was non-default. This is pretty much all scenarios since
nobody is likely to set it explicitly to the default value. In addition,
the `click` handler recomputes the tree because `urlTree` is a getter
that does the computation.

This commit effectively rolls back #60875
2026-01-07 14:08:13 -05:00
SkyZeroZx e7d99f02cb fix(forms): clean up abort listener after timeout
Removes the abort event listener once the debounce timeout completes.

This avoids lingering listeners, prevents potential memory leaks, and ensures
the abort logic runs at most once.
2026-01-07 14:07:25 -05:00
Kristiyan Kostadinov 3a56c1367f fix(compiler): produce accurate span for typeof and void expressions
Fixes that the `typeof` and `void` expressions were starting their spans from the expression start, rather than the keyword.

Fixes #66174.
2026-01-07 14:04:05 -05:00
SkyZeroZx 0d6ac92ccb docs: remove Component suffix from examples in DI & Drag and Drop
Updates documentation examples to remove the `Component` suffix, aligning them with the current Angular Style Guide.
2026-01-07 13:59:17 -05:00
AleksanderBodurri 241bdeb698 feat(devtools): create an info snackbar when a user logs a property
Previously there is no feedback when clicking this button in Angular DevTools itself, which can produce some confusion if the user does not have the browser console open as well, or if they accidentally turned on some filtering in the browser console.

Now Angular Devtools uses mat snack bar to inform the user that the task was successful
2026-01-07 13:40:45 -05:00
Angular Robot a6d7ee0bb4 build: update dependency ng-packagr to v21.1.0-rc.0
See associated pull request for more information.
2026-01-07 13:35:44 -05:00
Angular Robot c03e78dfbf docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-01-07 13:34:54 -05:00
Kristiyan Kostadinov 80b0fbba1f fix(core): avoid leaking view data in animations
The animations code currently tracks which views have running leave animations by adding them to a `Set`. This can leak memory if we don't clean something up on time.

These changes switch to tracking the views by their ID which doesn't risk retaining the view.

Fixes #66255.
2026-01-07 12:39:00 -05:00
Kristiyan Kostadinov a0dfa5fa86 feat(core): support rest arguments in function calls
Updates the template syntax to support rest arguments in function calls. This can be handy for functions with a variable number of arguments.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov 6e18fa8bc9 feat(core): support spread elements in array literals
Expands the template syntax to support spread elements inside arrays. This can be handy for some bindings.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov 19ca3b66a3 refactor(compiler): add spread elements to expression AST
Updates the expression AST to support spread elements that will be used for arrays and function calls.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov e9c3932e0e refactor(compiler): add spread elements to the output AST
Adds spread elements to the output AST which can be used in arrays and function calls.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov 63b0ad7fa5 refactor(compiler-cli): account for spread elements in translator
Adds the ability to generate spread elements in the linker.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov e407280ab5 feat(core): support spread expressions in object literals
Adds support for spread expressions inside of object literals. This can be handy when constructing maps for `class` bindings.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov 81549248b7 refactor(compiler): add spread elements to expression AST
Updates the expression AST to have support for spread elements inside object literals.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov a789ff0824 refactor(compiler-cli): account for spread assignments in linker
Updates the linker to account for spread assignments in object literals.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov 05ce944a9f refactor(compiler): support spread elements in output AST
Updates the output AST to account for spread elements.
2026-01-07 12:37:52 -05:00
Kristiyan Kostadinov 35830079bd refactor(compiler): handle spread operators in the lexer
Updates the expression lexer to handle spread operators.
2026-01-07 12:37:52 -05:00
Andreas Dorner 1c00ab42f8 feat(router): extend paramters of RedirectFunction to include paramMap and queryParamMap
adds paramMap and queryParamMap to the partial ActivatedRoute of the
RedirectFn

fixes ##60842
2026-01-07 12:36:54 -05:00
SkyZeroZx 85ce5f3ce7 docs: update copyright year 2026-01-07 12:28:34 -05:00
Andrew Scott 97fd1de0ac Revert "refactor(router): Add support for precommitHandler in Navigation integration"
This reverts commit 522fa716b8.
2026-01-07 11:45:58 -05:00
Andrew Scott 397dbc4c37 Revert "refactor(router): Retain original navigateEvent across redirects"
This reverts commit 53d3ae0feb.
2026-01-07 11:45:58 -05:00
Matthieu Riegler b17f93b6d1 docs(docs-infra): Use category for signal forms guides 2026-01-07 09:35:19 -05:00
Matthieu Riegler 640693da8e feat(compiler): Add support for multiple swich cases matching
consecutive `@case` blocks are now supported:

```ts
@switch (case) {
  @case (0)
  @case (1) {
    case 0 or 1
  }
  @case (2) {
    case 2
  }
  @default {
    default
  }
}
```

fixes #14659
2026-01-07 09:23:50 -05:00
Andrew Scott e44839b016 feat(router): Add standalone function to create a comptued for isActive
This change deprecates `Router.isActive` in favor of a function that
creates a computed which tracks whether a given url/UrlTree is active,
following changes in the router state.

`Router.isActive` contributes ~1333b to the bundle size, but is only
used by developers who use the API directly or who use
`RouterLinkActive`. It should not contribute to bundle sizes of
applications that do not use this functionality.
2026-01-07 09:23:06 -05:00
hawkgs 51ed487fae docs(core): fix Ivy view data docs tables
The current formatting prevents the tables to be rendered making it hard to read them.
2026-01-07 09:22:43 -05:00
SkyZeroZx 3dfdb71d65 docs: add docs for transform property in built-in loaders 2026-01-07 09:17:59 -05:00
Paweł Kawula f811c6c69d docs: fixed incorrect link in migrating-to-vitest.md
provided correct link to section about vitest fake timer
2026-01-07 09:10:30 -05:00
Andrew Scott 174d2da29a Revert "fix(router): Ensure createUrlTree does not reuse segments of input"
This reverts commit 39efb62c0f.
2026-01-06 16:29:19 -08:00
Miles Malerba 2d85ae5811 feat(forms): add [formField] directive
This will replace the `[field]` directive, since `[field]` is a very
generic name for signal forms to commandeer

refactor(forms): hook up `formField` directive in compiler

Hooks up the `formField` direcive to get the same treatment as the
`field` directive in the compiler.

apply updated formatting
2026-01-06 17:21:06 -05:00
Andrew Scott 53d3ae0feb refactor(router): Retain original navigateEvent across redirects
This builds off of #66197 by retaining the original navigateEvent across redirects
so the NavigateEvent can more accurately track the lifecycle of a navigation,
which may span across several NavigationStart events due to redirects
2026-01-06 16:10:56 -05:00
Andrew Scott 522fa716b8 refactor(router): Add support for precommitHandler in Navigation integration
The `precommitHandler` of the Navigation API unlocks some of the truly
powerful features for Routers like Angular's which defer the URL
updates. Without the `precommitHandler`, we cannot initiate a navigation
until we are ready to commit the URL because it causes the URL to update
immediately.

With `precommitHandler` support, we are able to create a `NavigateEvent`
_immediately_ on navigation, which allows the browser to show that a
navigation is happening with a loading indicator. Site visitors will
also have the ability to cancel the navigation with the "stop" button.
When we are ready to commit the URL, the precommitHandler supports a
"redirect" function that we can use to first redirect the navigation to
a new location immediately before committing it.

The commit operation is not synchronous because the API waits for all
precommitHandlers to resolve. This commit adds a small bit of handling
to account for this so that the Router's transition does not advance
to the next stage until the URL has been committed.
2026-01-06 16:10:56 -05:00
Andrew Scott dd58c4b667 refactor(common): Add token to indicate whether precommit handler is supported
This commit adds a token that indicates whether the precommitHandler feature
is supported by the navigation api.

https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/intercept#precommithandler
2026-01-06 16:10:56 -05:00
Alan Agius 91dc91bae4 fix(core): sanitize sensitive attributes on SVG script elements
This commit updates the DOM security schema and sanitization logic to properly recognize and sanitize `href` and `xlink:href` attributes on SVG `<script>` elements.
2026-01-06 15:49:52 -05:00
Angular Robot e2e5b66726 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-06 15:29:27 -05:00
Leon Senft 82a2de201f refactor(forms): bind native properties on interop controls
The framework will now bind all field state properties to their
corresponding native properties (if any) on interop form controls (those
using `ControlValueAccessor`), excluding those handled explicitly by
`ControlValueAccessor` such as `disabled`.
2026-01-06 13:12:17 -05:00
Leon Senft 15bddbdcda refactor(forms): bind field properties to all directives on interop controls
The framework will now bind the field state properties to all matching
directive inputs on form controls using Reactive Forms'
`ControlValueAccessor`.
2026-01-06 13:12:17 -05:00
Leon Senft 0c8f15d546 refactor(forms): bind field properties to all directives on custom controls
The framework will now bind the field state properties to all matching
directive inputs on custom form controls.
2026-01-06 13:12:17 -05:00
Leon Senft c149f47ef6 refactor(forms): bind field properties to all directives on native controls
Since the `Field` directive manages binding `FieldState` properties to
the underlying form control automatically, the type checker prohibits
explicit bindings to the same properties to avoid conflicts. This proved
problematic in cases where developers wanted to bind these properties to
the inputs of other directives on form controls. Now the framework will
bind the field state properties to all matching directive inputs on
native controls.

Fix #65617
2026-01-06 13:12:17 -05:00
Andrew Scott 39efb62c0f fix(router): Ensure createUrlTree does not reuse segments of input
Mutating the `UrlTree` that is returned by `createUrlTree` can cause the
input, which might even be an active route, to be mutated. This ensures
the `UrlSegment`s are recreated and do not mutate the input.

fixes #54624
2026-01-06 13:11:54 -05:00
Kristiyan Kostadinov 10da2f9029 fix(compiler): better types for a few expression AST nodes
We had `any` types for `LiteralArray.expressions`, `Chain.expressions`, `BindingPipe.args`, `LiteralPrimitive.value` and `LiteralMap.values`. These changes add proper types to them.
2026-01-06 12:16:28 -05:00
Shuaib Hasan Akib b93d5ec27a docs(forms): add documentation links to Signal Forms API
Add @see JSDoc tags to Signal Forms API functions and classes to link to the essentials guide and detailed documentation pages. This improves discoverability of Signal Forms documentation from the API reference.
2026-01-06 10:34:46 -05:00
hawkgs f05d0feac9 fix(devtools): injector tree initial root node snapping on prod
Fix initial broken root node snapping/focusing when the Injector Tree tab is opened in the production app.
2026-01-06 10:22:29 -05:00
hawkgs 4b7f7a550f fix(devtools): retain tree-viz snapped node on pre-render cleanup
Each tree-visualizer render cycle resets the snapped node in an effort to not end up with a non-existent snapped node. However, each render cycle doesn't constitute a completely different tree. This change retains the snapped node as long as it exists in the tree.
2026-01-06 10:22:29 -05:00
hawkgs 2d9e179188 perf(devtools): improve injector tree rendering performance
Introduce an equality function for transformed injector trees in order to omit redundant D3 tree visualization render cycles when the tree hasn't been changed.
2026-01-06 10:22:29 -05:00
Angular Robot de43806a2e build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-06 10:20:03 -05:00
Andrew Scott db470f0881 refactor(router): Remove internal rxjs recognize implementation
All uses of this have been removed internally and it's no longer needed
2026-01-06 10:13:19 -05:00
Matthieu Riegler 71cde39ff0 docs: rewrite testing docs
Those rewrites focus on using Vitest instead of jasmine, drop usages of `fakeAsync`, present modern testing strategy that rely on `whenStable` more than explicit calls to `detectChanges`.

fixes #42748, #48510, #64962, #65987, #66029,  #66150
2026-01-05 19:38:23 -05:00
Shuaib Hasan Akib 456ca35906 docs(forms): fix duplicate validator reference titles in AbstractControl
The removeValidators and hasValidator methods both had identical "Reference to a ValidatorFn" section titles, causing duplicate entries in the API documentation table of contents.
2026-01-05 19:26:31 -05:00
Angular Robot 9184146529 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-05 17:35:48 -05:00
Andrew Scott df2aaaaede docs(vscode-extension): Update developer docs to match current setup
developer docs needed an update after moving to the angular/angular repo
2026-01-05 17:01:49 -05:00
Andrew Scott 1bf1e7e2a7 refactor(vscode-extension): Use v999 when version is 0.0.0
0.0.0 is the version in the local repo when building from sources. Update the
extension to see this as some arbitrarily large version so it uses the most recent features
2026-01-05 17:01:49 -05:00
Andrew Scott 2ff718869f refactor(vscode-extension): Remove pre-19 integration project
This updates the pre-v19 integration test to use the regular integration
project but pass a specific version and update file contents as
necessary to excersise the code path that uses the default standalone
value. This allows us to remove the old project from the workspace,
allowing the language service to use more recent versions when working
with the adev project, for example.
2026-01-05 17:01:49 -05:00
SkyZeroZx 1532be9d00 refactor(core): introduce tree-shakeable runtime error codes for NgModule handling and ViewContainerRef errors
Adds new tree-shakeable runtime error codes to improve error reporting for
NgModule resolution issues (duplicate or missing IDs) and invalid ViewContainerRef
operations involving destroyed views.
2026-01-05 16:52:24 -05:00
cexbrayat 46a276ac9c docs: update MCP devserver tool names to use dot notation
This updates the documentation to match the changes in angular-cli:
- dot notation for tool names: https://github.com/angular/angular-cli/commit/18d74dde8938dbe566df80753d5c148c19040179
- tool group support for devserver: https://github.com/angular/angular-cli/commit/427c3a93329d826f4b4a7d879ca8e2af275ff03b
2026-01-05 15:58:22 -05:00
SkyZeroZx a6b8cb68af feat(common): support custom transformations in ImageKit and Imgix loaders
Adds a `transform` parameter for ImageKit and Imgix image loaders.
2026-01-05 15:50:13 -05:00
Angular Robot 14f5cc4e9b docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2026-01-05 15:26:39 -05:00
Matthieu Riegler 15308149db docs(docs-infra): Add package filter to the API list
This commit also introduces the usage of signal forms on adev
2026-01-05 15:21:33 -05:00
Andrew Scott 5edceffd04 feat(router): add controls for route cleanup
This commit introduces a new feature to automatically destroy `EnvironmentInjector`s associated with routes that are no longer active or stored. This helps in managing memory by releasing resources held by unused injectors.
2026-01-05 14:43:56 -05:00
Shuaib Hasan Akib e6631f0007 docs(docs-infra): sync heading colors between docs and API pages
Aligns documentation heading colors across docs and API pages to ensure
visual consistency and a cohesive reading experience.
2026-01-05 12:36:58 -05:00
Charles Lyding ab0fb1633c build(forms): setup infrastructure for code examples
This commit introduces the infrastructure for embedding code examples within Angular packages, enabling them to be consumed by the Angular CLI's MCP server.

The `@angular/forms` package is the first to adopt this new feature. A new `ng_examples_db` Bazel rule is used to build a SQLite database from markdown files containing code examples. This database is then included in the published npm package.

The `package.json` for `@angular/forms` has been updated with an `angular.examples` field to allow tooling to discover and use the code examples.
2026-01-05 12:36:00 -05:00
SkyZeroZx ed7bfb3c88 feat(docs-infra): Extracts aliases from doc entries
Implements a mechanism to extract alias names from a directive's selector.
2026-01-05 12:33:14 -05:00
SkyZeroZx b735c45974 docs: update tsDoc code examples to use TypeScript syntax highlighting 2026-01-05 12:31:44 -05:00
Matthieu Riegler 6a94300179 refactor(devtools): use whenStable instead of detectChanges
This commits migrates the devtools tests toward to recommendations
and runs the tests in a zoneless config
2026-01-05 12:24:58 -05:00
Angular Robot 821d5652b0 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-05 12:17:15 -05:00
SkyZeroZx b1a0d1d8e2 docs: Add form control state management and event options 2026-01-05 12:16:09 -05:00
SkyZeroZx c1d72af10d docs(docs-infra): add external link styles to API reference documentation
Adds the missing icon external link styling to the API reference documentation.
2026-01-05 12:14:31 -05:00
SkyZeroZx fa430bffb0 docs: add @see links to API docs for better discoverability 2026-01-05 12:12:24 -05:00
SkyZeroZx 712d8f41e8 refactor(router): Simplifies unsubscribe logic
Uses optional chaining to simplify unsubscribe handling.
Also improving tree-shaking by limiting injector names to route paths using `ngDevMode`
2026-01-05 12:08:08 -05:00
SkyZeroZx a9283ca93a docs: add section on converting writable signals to readonly 2026-01-05 12:03:11 -05:00
Shuaib Hasan Akib bcaa001cac docs: fix incorrect Input import in example
Update the documentation example to import input instead of Input,
ensuring the code reflects the signal-based API and current Angular
recommendations.
2026-01-05 12:02:16 -05:00
Shuaib Hasan Akib 8358e548ce fix(docs-infra): stop auto-linking "state" and "group" to APIs
Prevents common words used in code examples from being incorrectly
linked to API references.

Fixes: #66292
2026-01-05 12:01:51 -05:00
SkyZeroZx 5d3708e5ed docs: prevent mobile overflow in the route behavior customization example 2026-01-05 12:00:59 -05:00
Logan Mzz ef48826dc7 docs: fix reference to parent from children resolvers 2026-01-05 11:55:53 -05:00
Kirill Cherkashin 4a8ad92cee docs(forms): update migration guide (#66111)
PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs d8e3bcff5e docs(forms): Address feedback (#66111)
Update `Automatic status class` section

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs 25f6441a10 docs(forms): Address feedback (#66111)
Update the Automatic status classes section to make NG_STATUS_CLASSES go first.

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs c41bb1b8ec docs(forms): Address feedback (#66111)
Change wording and formatting and clean up.

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs 8b57bcdf3d docs(forms): Add a section for automatic form binding (#66111)
To avoid manually adding classes like `.ng-valid`, `.ng-dirty` etc to every field, you can provide a global configuration using `provideSignalFormsConfig`.

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs 57193c5c2a docs(forms): add a Accessing values section (#66111)
This explains how to get the value of a compat form

PR Close #66111
2026-01-05 11:54:44 -05:00
kirjs d62734842a docs(forms): add migration guide for Signal Forms (#66111)
This commit introduces a new guide for migrating from legacy forms (Reactive and Template-driven) to the new Signal Forms.

PR Close #66111
2026-01-05 11:54:43 -05:00
SkyZeroZx a5ebdd9cd1 docs(docs-infra): Fixes the visibility of the copy link button in CLI headings
Fixes the visibility of the copy link button in CLI documentation headings.
2026-01-05 11:52:24 -05:00
Matthieu Riegler c225b03c91 docs: fix typos in Effects doc in Signals guide 2026-01-05 11:51:01 -05:00
Matthieu Riegler 3a85031dc0 docs(docs-infra): Modernize tests
Remove usages of `detectChanges` and rely on `whenStable`.
This commit also removed the usage of `provideZonelessChangeDetection` which is no longer necessary.
2026-01-05 11:47:08 -05:00
hawkgs 8795e9f031 refactor(devtools): update extension icon
Change the color of the inactive extension from black to gray (for better contrast in dark mode) and slightly enlarge all of the icons.
2026-01-05 11:42:49 -05:00
Angular Robot 29574f622d build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-02 14:24:17 +01:00
Kristiyan Kostadinov 1765ebe79b Revert "refactor(core): Add ngDevMode guards and new sanitization error codes"
This reverts commit 4e7e38c591.
2026-01-02 11:37:24 +01:00
Angular Robot d868a5bc6d build: update bazel dependencies
See associated pull request for more information.
2026-01-02 08:31:30 +01:00
Angular Robot 8fa602176c build: update all non-major dependencies
See associated pull request for more information.
2026-01-02 08:31:03 +01:00
Angular Robot 708a813f5f build: update pnpm to v10.27.0
See associated pull request for more information.
2026-01-02 08:30:38 +01:00
Kristiyan Kostadinov 41eacff363 test(compiler): switch compliance tests to es2022
Sets up the compliance tests to target es2022 since that's the default in the CLI. Also updates all of the tests, primarily because the generated output for static properties has changed.
2026-01-02 08:29:12 +01:00
Shuaib Hasan Akib 75fa37a0dd docs: Incorrect Highlighting in Content Queries Example
Fixes: #66284
2026-01-02 08:28:44 +01:00
Shuaib Hasan Akib e3781cd88a docs: fix incorrect FormArray example link
Update the typed forms guide link to point to the correct
FormArray section instead of the FormControl getting started example.
2026-01-02 08:28:17 +01:00
Kristiyan Kostadinov 3a26244d61 fix(compiler-cli): fix up spelling of diagnostic
Fixes the spelling for the `component is missing a template` diagnostic and expands it a bit.
2026-01-02 08:27:27 +01:00
Adam Podroužek 402ecaf85c docs: fix URL link to valibot 2026-01-02 08:27:04 +01:00
aparziale b54bc1b16e docs(docs-infra): LoadComponent along with loadChildren
Added example with loadComponent along with loadChildren

Fix #66257
2026-01-02 08:26:30 +01:00
kirjs 282220d032 fix(forms): Support readonly arrays in signal forms
This would allow using `readonly Array<...>` in types
2026-01-02 08:26:06 +01:00
SkyZeroZx 004813dc37 docs: use currentNavigation instead of deprecated getCurrentNavigation 2026-01-02 08:25:43 +01:00
SkyZeroZx e409757208 docs(docs-infra): fixes copy-to-clipboard icon moves to a new line for long heading text
Fixes an issue where the copy-to-clipboard icon moves to a new line when heading text is long and wraps.
Applies improved text wrapping for headings to keep the icon visually aligned.

Fixes #66239
2026-01-02 08:24:39 +01:00
SkyZeroZx baa19e2cf0 docs: update next steps in Signal Forms tutorial and fix broken link 2026-01-02 08:23:43 +01:00
SkyZeroZx 3b73eff0b4 docs(docs-infra): apply OnPush change detection and remove redundant root provider
Adds OnPush change detection and removes a redundant `providedIn: 'root'` injection token.
2026-01-02 08:23:20 +01:00
Matthieu Riegler 80eb5c4d8a docs(docs-infra): user-select none for buttons
fixes #66214
2026-01-02 08:22:16 +01:00
Kristiyan Kostadinov fa7cb4b87a fix(compiler): stop ThisReceiver inheritance from ImplicitReceiver
Back in #39323, I added a new `ThisReceiver` node to represent accesses done through `this` and I ended up making it inherit from `ImplicitReceiver`. The logic was that in most cases accessing through `this` was the same as the implicit access.

Over the years this has proven to not be a great idea, because no other AST nodes do this and one has to keep it in mind whenever dealing with `ImplicitReceiver`.

These changes remove the inheritance and update all of the usage sites accordingly.
2026-01-02 08:21:49 +01:00
JoostK f12e160bc1 fix(compiler-cli): support qualified names in typeof type references
This commit expands the static interpreter to now understand qualified names in `typeof`
type queries.

Fixes #65686
2026-01-02 08:21:08 +01:00
JoostK 106ba63650 fix(compiler-cli): ensure component import diagnostics are reported within the imports expression
PR #60455 improved error reporting for `@Component.imports` by scoping the diagnostic to an individual
element within the `imports` array, but this may introduce hard to track diagnostics when it ends
up being reported (far) away from the component itself.

This can be even more problematic when the diagnostic would end up being reported in a declaration file,
as happened in issue #65686; the declaration files of an imported library contained syntax that the
static interpreter did not support, hence the `@Component.imports` was rejected with a diagnostic reported
in the library's declaration file. This diagnostic isn't guaranteed to be reported (e.g. the CLI only
gathers Angular-specific diagnostics for Angular-compiled files, which excludes declaration files).

This commit changes the diagnostic location to ensure it is being reported within the `@Component.imports`
expression, in most cases retaining the desirable effect of #60455 while avoiding out-of-band diagnostics.
2026-01-02 08:21:08 +01:00
hawkgs eb5f5b61c3 refactor(devtools): rename detect angular script name
Drop the 'for-extension-icon' since the script is dealing only with the app detection.
2026-01-02 08:20:19 +01:00
SkyZeroZx 02e80b4ea2 refactor(core): implement missing OnDestroy for schedulers
Implements the missing OnDestroy interface. Also removes an unused generic from a performance logging function.
2026-01-02 08:19:57 +01:00
aparziale 66637f1c3f docs(docs-infra): Fix incorrect code highlight in Creating an output based on an RxJS Observable
Fix highlighted line in output-interop.md documentation

Fixes: #66187
2026-01-02 08:18:31 +01:00
Kristiyan Kostadinov 76fa180005 fix(compiler): provide location information for literal map keys
Adds spans for the keys of a `LiteralMap`.

Fixes #66175.
2026-01-02 08:18:02 +01:00
SkyZeroZx 398078f456 refactor(forms): add MANAGED_METADATA_LAZY_CREATION runtime error
Add the `MANAGED_METADATA_LAZY_CREATION` `RuntimeError`  in signal form,
making it tree-shakeable.
2026-01-02 08:17:39 +01:00
Alan Agius 0d9e51e766 build: switch Node.js toolchain to derive version from .nvmrc.
Remove hardcoded node.js version
2026-01-02 08:16:50 +01:00
SkyZeroZx a7762c79b8 docs: update localization docs and modernize examples
Improves the localization documentation by updating code highlight syntax issues
and removing outdated TODOs.

Additionally, the CDK examples have been updated to use the viewChild query signal API,
aligning the docs with current recommended patterns.
2026-01-02 08:16:25 +01:00
Charles Lyding 6758f9326e build: use Node.js built-in TypeScript support for dev-infra scripts
This change removes the use of `tsx` to execute both `ng-dev` and the repo level development scripts.
2026-01-02 08:15:40 +01:00
Matthieu Riegler c69b67147a ci: add Charles & Doug as optional adev reviewers
Since we also have tooling docs...
2026-01-02 08:14:37 +01:00
Alan Agius e11f02af81 docs: update flattened type definitions description to include rollup-plugin-dts. 2026-01-02 08:14:05 +01:00
Shuaib Hasan Akib abb179466d refactor(core): mark VERSION exports as pure for better tree-shaking
Adds a PURE annotation to VERSION constants, enabling tree-shaking
and keeping the implementation consistent with other pure exports.
2026-01-02 08:13:40 +01:00
Shuaib Hasan Akib 54a49ad9eb docs: update Angular Package Format version references to latest 2026-01-02 08:12:45 +01:00
hawkgs 0db09e33b1 fix(devtools): false positive app not detected
Since Manifest V3, the service worker (background) gets terminated after 30s of inactivity. This can break the initialization phase of DevTools or the BE-FE communication channel, if already initialized. To prevent that, we emit a heartbeat in a >30s interval.
2026-01-02 08:12:18 +01:00
Alan Agius 98bfd139ee build: correct markdown link syntax for commit hashes in changelog generation
The links were generated incorrectly
2026-01-02 08:11:47 +01:00
SkyZeroZx 93fe833088 refactor(core): remove unused Injector and Renderer2 dependencies from hydration functions
Removes the unsued `Injector` & `Renderer2` dependency from the hydration annotation process.
2026-01-02 08:11:16 +01:00
SkyZeroZx 59c1dcc662 docs(docs-infra): adjust z-index to prevent adev tutorial nav overlapping sidebar
Updated the z-index hierarchy to avoid the adev tutorial navigation bar
overlapping the main sidebar.
2026-01-02 08:10:53 +01:00
Leon Senft e7745dc9dd test(forms): add test coverage for binding errors to custon controls
This input was missing dedicated test coverage.
2026-01-02 08:09:35 +01:00
Leon Senft 8832fc01b2 test(forms): remove duplicate test case
We had two test cases that tested the `Field` directive synchronizes
with a custom checkbox control components.
2026-01-02 08:09:35 +01:00
Leon Senft 1a4c3eb1d0 fix(forms): allow custom controls to require pending input
* Allow custom controls to make `pending` a required input
* Refactor test for `pending` input to be consistent with other control
  properties
* Test that `pending` inputs are reset when the field binding changes
2026-01-02 08:09:35 +01:00
Leon Senft 9ad603fa11 test(forms): remove obsolete test case
There's no longer a need to test that inputs are set before
initialization on custom controls now that required inputs are
supported.
2026-01-02 08:09:35 +01:00
Leon Senft 4f73a350a5 test(forms): refactor and improve test coverage for disabledReasons input
* Refactor test for `disabledReasons` input to be consistent with other control
  properties
* Test that `disabledReasons` inputs are reset when the field binding changes
2026-01-02 08:09:35 +01:00
Leon Senft 89c37f1f7f fix(forms): allow custom controls to require dirty input
* Allow custom controls to make `dirty` a required input
* Refactor test for `dirty` input to be consistent with other control
  properties
* Test that `dirty` inputs are reset when the field binding changes
2026-01-02 08:09:35 +01:00
Leon Senft b563b5cfc2 test(forms): refactor and improve test coverage for invalid input
* Refactor test for `invalid` input to be consistent with other control
  properties
* Test that `invalid` inputs are reset when the field binding changes
2026-01-02 08:09:35 +01:00
Leon Senft 82edf18427 fix(forms): allow custom controls to require hidden input
* Allow custom controls to make `hidden` a required input
* Refactor test for `hidden` input to be consistent with other control
  properties
* Test that `hidden` inputs are reset when the field binding changes
2026-01-02 08:09:35 +01:00
Leon Senft cb09fb8308 fix(forms): support custom controls with non signal-based models
* Recognize directives with non signal-based models as valid custom controls
* Relax type checker to allow non signal-based models

The `FormValueControl` and `FormCheckboxControl` interfaces still
require a `model()`-input, however, a custom control need not implement
either interface to be bound by the `Field` directive.

All of the following examples can be used to define a custom control:

```ts
// Preferred: model()
class MyFormControl implements FormValueControl<string> {
  readonly value: model.required<string>();
}

// Supported: input() + output()
class MyFormControl {
  readonly value: input.required<string>();
  readonly valueChange: output<string>();
}

// Supported: @Input() + @Output()
class MyFormControl {
  @Input({required: true}) value!: string;
  @Output() valueChange: new EventEmitter<string>();
}
```

The latter two may still choose to implement `FormUiControl` for other
properties, but again it is not required.

Fix #65478
2026-01-02 08:09:03 +01:00
Leon Senft 817e2b87a8 refactor(forms): always bind [field] to ControlValueAccessor if present
Change the order of precedence that `[field]` binds to from

  1. Custom control (`FormValueControl`, `FormCheckboxControl`)
  2. Interop control (`ControlValueAccessor`)
  3. Native control (`<input>`, `<select>`, `<textarea>`)

to

  1. Interop control (`ControlValueAccessor`)
  2. Custom control (`FormValueControl`, `FormCheckboxControl`)
  3. Native control (`<input>`, `<select>`, `<textarea>`)

This ensures that Reactive Forms controls authored to use
`ControlValueAccessor` work correctly with Signal Forms, even if they
happen to conform to the `FormValueControl` interface.
2026-01-02 08:09:03 +01:00
SkyZeroZx 4e7e38c591 refactor(core): Add ngDevMode guards and new sanitization error codes
Adds new runtime sanitization error codes. Adds `ngDevMode` guards around
error message strings to ensure detailed diagnostics are included only
in development mode. This allows production builds to tree-shake verbose error descriptions, reducing bundle size.
2026-01-02 08:08:21 +01:00
SkyZeroZx d8790972be feat(common): Add custom transformations for Cloudflare and Cloudinary image loaders
Adds support for custom transformations to Cloudinary and Cloudflare image loaders via a `transform` parameter.

Fixes #65191 #64639
2026-01-02 08:07:29 +01:00
Doug Parker 5a146b3256 release: bump Angular DevTools version to 1.6.4 2025-12-18 13:06:36 -08:00
Angular Robot e5a7eb37cf build: update cross-repo angular dependencies to v21.1.0-next.3
See associated pull request for more information.
2025-12-17 16:55:58 -08:00
Andrew Scott 99ad18a4ee feat(core): Add stability debugging utility
This commit adds a utility method to debug why the application has not stabilized after
a set period of time (9 seconds, or `hydrationTimeout-1`).

fixes #52912
2025-12-17 15:43:05 -08:00
Miles Malerba 244b54c9bf refactor(forms): rename server errors to submission errors
This better reflects the intent to indicate an error during submission,
regardless of whether the error came from the server or not.
2025-12-17 15:42:07 -08:00
Angular Robot 3a32556a78 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-17 15:41:23 -08:00
Andrew Seguin e2a9938c51 fix(core): explicitly cast signal node value to String
If the computed's `toString` is called and `node.value` is a Symbol, the browser will throw an exception `ERROR TypeError: Cannot convert a Symbol value to a string`

Symbols cannot be implicitly changed to strings. This change changes the conversion to be explicit by wrapping `node.value` with `String()`

This can be reproduced if you create a computed with `createComputed(computation, equal)` and call `toString()` while `node.value` is something like `Symbol(UNSET)`
2025-12-17 14:38:38 -08:00
Angular Robot d67d8f78b6 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-17 14:35:14 -08:00
Shuaib Hasan Akib e9d1c6478a docs(docs-infra): clean up TODO comment, unused imports, and helper function 2025-12-17 14:33:58 -08:00
Shuaib Hasan Akib ad88c72f24 docs: fix incorrect line highlighting in tutorials
Ensures highlighted lines in tutorial examples match the
corresponding code shown to readers.
2025-12-17 14:26:30 -08:00
Miles Malerba 5b06996fb2 docs: call out breaking changes as experimental
Explicitly calls out that recent breaking changes were only for
experimental features
2025-12-17 14:25:33 -08:00
Andrew Scott 6ad0a4fe53 docs: release notes for the vscode extension 21.0.1 release 2025-12-17 14:24:38 -08:00
Andrew Kushnir 664fa393b7 release: cut the v21.1.0-next.4 release 2025-12-17 13:19:21 -08:00
Andrew Kushnir fe30b2fd27 docs: release notes for the v21.0.6 release 2025-12-17 13:14:30 -08:00
Alan Agius 868cb7cb45 build: migrate Bazel ignore rules from .bazelignore to REPO.bazel
See: https://bazel.build/rules/lib/globals/repo and https://github.com/aspect-build/rules_js/blob/092dd7892b816f899c7ab5b794fdb6236abb6939/docs/pnpm.md?plain=1#L77
2025-12-17 10:14:00 -08:00
Andrew Scott ce1a4769f9 fix(language-service): Prevent language service from crashing on suggestion diagnostic errors
This prevents the language service from crashing when a
`FatalDiagnosticError` is thrown when retrieving suggestion diagnostics.

fixes #66069
2025-12-17 10:13:11 -08:00
Angular Robot 2e58b66810 build: update pnpm to v10.26.0
See associated pull request for more information.
2025-12-17 09:56:35 -08:00
Angular Robot bfec9c019b build: update bazel dependencies
See associated pull request for more information.
2025-12-17 09:55:22 -08:00
Shuaib Hasan Akib 3e57f9eaf5 docs: add documentation for schema validation with Signal Forms
Fixes: #66098
2025-12-17 09:52:46 -08:00
Angular Robot 7335b98600 build: update dependency rollup to v4.53.5
See associated pull request for more information.
2025-12-17 09:50:30 -08:00
Angular Robot d118320c8b build: update all github actions
See associated pull request for more information.
2025-12-17 09:48:27 -08:00
SkyZeroZx 50d5c2997f docs: align lightweight injection tokens with the style guide 2025-12-17 09:45:14 -08:00
Matthieu Riegler d23ce76821 docs(docs-infra): leverage the search on 404
This introduces a search result matching the requested url when the page couldn't not be found.
2025-12-17 09:40:42 -08:00
kirjs 6f6b2408fa refactor(forms): convert Signal Forms errors to use RuntimeError
- Added 13 new error codes to forms/src/errors.ts (1900-1999)
- use RuntimeError
2025-12-17 09:39:57 -08:00
SkyZeroZx 9f5744a92d fix(language-service): avoid interpolation highlighting inside @let
This change omits treating `{{ }}` interpolation syntax as valid inside `@let` binding strings, preventing the interpolation curly braces from superseding the match of the surrounding binding expression and ensuring the highlighter reflects the correct semantics of `@let` bindings.

fixes #61643
2025-12-17 09:39:18 -08:00
Alan Agius f516370c8e fix(core): use mutable ResponseInit type for RESPONSE_INIT token
The `RESPONSE_INIT` token previously used `ResponseInit`. However, `@types/node` (and `undici`) definitions for `ResponseInit` mark properties as `readonly`, which differs from the standard DOM `ResponseInit`.

This commit introduces a `ResponseInit` type that explicitly removes `readonly` modifiers to ensure compatibility and allow for mutable options. This type is now used by the `RESPONSE_INIT` token and is exported from `@angular/core`.
2025-12-17 09:35:22 -08:00
Andrew Kushnir 9fa77af110 Revert "fix(core): explicitly cast signal node value to String"
This reverts commit c501b25d04.
2025-12-16 17:37:34 -08:00
Andrew Seguin c501b25d04 fix(core): explicitly cast signal node value to String
If the computed's `toString` is called and `node.value` is a Symbol, the browser will throw an exception `ERROR TypeError: Cannot convert a Symbol value to a string`

Symbols cannot be implicitly changed to strings. This change changes the conversion to be explicit by wrapping `node.value` with `String()`

This can be reproduced if you create a computed with `createComputed(computation, equal)` and call `toString()` while `node.value` is something like `Symbol(UNSET)`
2025-12-16 16:38:02 -08:00
SkyZeroZx 62ccd64e9f docs: add section about reactive contexts 2025-12-16 16:35:24 -08:00
Marc Stammerjohann dc7ae9aef3 docs(router): add missing inject import 2025-12-16 16:34:20 -08:00
Matthieu Riegler db3614f2d5 build: add commits to the ignore revs files.
PR #66089 & #66107 both landed changes to the formatting
2025-12-16 16:32:49 -08:00
Matthieu Riegler 6270bba056 ci: reformat files
This is after we've slightly changed a rule in #66056
2025-12-16 14:44:19 -08:00
Andrew Scott 06be8034bb fix(core): Microtask scheduling should be used after any application synchronization
Previously, Angular would switch from the macrotask to a microtask
scheduler _only_ when the scheduler was the trigger for the
synchronization. This microtask scheduling is to ensure patterns such as
`Promise.resolve().then(() => updateAppStateAgain())` _during_
synchronization are caught and synchronized again within the same event
loop (guaranteeing that they aren't split across multiple browser paints).

The microtask scheduler should be used after any tick, not just from
those than run within the scheduler to always account for the promises
within synchronization. This is encountered most frequently during
bootstrap, which triggers the tick directly.

In this change we exempt `TestBed.tick` and
`ComponentFixture.detectChanges` from this behavior. Doing so would affect
the timing of stability and tests are quite sensitive to this (e.g.
`fixture.whenStable`). It is somewhat unfortunate that we have "special" test-only
behavior. However, it is important to acknowledge that this only affects
the test-only APIs as well. Any code in the application under test that
triggers `ApplicationRef.tick` directly would still use the microtask
scheduling behavior.

fixes #65444
2025-12-16 13:34:48 -08:00
Miles Malerba ae0c59028a refactor(forms): rename field to fieldTree in FieldContext and ValidationError
BREAKING CHANGE:
2025-12-16 10:26:22 -08:00
SkyZeroZx 2ccdf50fba refactor(platform-browser): remove unused platformIsServer flag from renderer
The` platformIsServer` flag is no longer referenced by the renderer and is effectively unused.
Removing it simplifies the implementation and avoids carrying redundant state.
2025-12-16 10:25:10 -08:00
SkyZeroZx bf2e50843d refactor(core): conditionally include debug names based on ngDevMode
Conditionally include debug-related metadata based on `ngDevMode` to avoid
unnecessary information in production builds.
2025-12-16 09:37:38 -08:00
Angular Robot db5429fbb2 build: lock file maintenance
See associated pull request for more information.
2025-12-16 09:36:22 -08:00
Angular Robot 2afae2719a build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-16 09:33:34 -08:00
Ben Hong 3750622c46 docs: update links to guides in signal forms overview 2025-12-16 09:29:11 -08:00
SkyZeroZx 53c447e3c8 docs: update lightweight injection tokens guide to use contentChild, contentChildren, and inject APIs. 2025-12-16 09:28:23 -08:00
Matthieu Riegler af77b89e2a ci: reformat files
This is after we've slightly changed a rule in #66056
2025-12-16 09:24:36 -08:00
Shuaib Hasan Akib 3ff20a58d3 refactor(docs-infra): remove deprecated h.JSX.HTMLAttributes usage
Import HTMLAttributes directly from preact to address deprecation warning in header-api.tsx
2025-12-15 17:44:24 -08:00
Matthieu Riegler b4f584cf42 fix(core): return StaticProvider for providePlatformInitializer
Returning `EnvironmentProviders` was never correct.
fixes #64277
2025-12-15 15:16:37 -08:00
Angular Robot 11e271ca6a build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-15 14:19:07 -08:00
Alan Agius d4111eebc6 refactor(compiler): remove unnecessary sanitization for safe attributes
Remove sanitization for attributes that cannot execute code (e.g. `javascript: URIs`).
2025-12-15 14:13:38 -08:00
Kirill Cherkashin 193aa332fc docs(forms): improve JSDoc for Signal Forms Schema types
Improved documentation for Schema, SchemaFn, and SchemaOrSchemaFn types
with clearer descriptions and usage examples.
2025-12-15 14:02:35 -08:00
Angular Robot 356092a24d docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-15 13:27:23 -08:00
Matthieu Riegler 44d4439bc4 refactor(forms): add signal forms to the type tests
This will ensure that signal forms emit valid typings.
Also this commits moves `@standard-schema/spec` from peer-dep to regular dep
2025-12-15 11:44:54 -08:00
kirjs 3a01d72850 refactor(forms): convert Signal Forms errors to use RuntimeError
- Added 13 new error codes to forms/src/errors.ts (1900-1999)
- use RuntimeError
2025-12-15 11:44:02 -08:00
Angular Robot 915eee3abd build: update all github actions to v6
See associated pull request for more information.
2025-12-15 11:43:06 -08:00
Angular Robot aabf719a6d build: update dependency bazel to v8.5.0
See associated pull request for more information.

Closes #66067 as a pr takeover
2025-12-15 11:41:43 -08:00
Alan Agius 2a5c6919d0 build: remove API doc generation for localize/init and add mnemonic to API rendering rule.
The removed target was not used and was generating an empty output which causes `java.io.IOException: mandatory output packages/localize/init/localize_docs_html was not created`
2025-12-15 11:41:43 -08:00
Andrew Scott a1eb2cef16 docs: update link to releases for vscode extension 2025-12-15 11:41:14 -08:00
Shuaib Hasan Akib a2aa8fef05 docs: format CLI builder JSON examples using fenced blocks
Replaces custom docs-code components with fenced ```json``` blocks for
CLI builder examples, improving readability, consistency, and copy
support across the documentation.

Fixes #66060
2025-12-15 11:34:57 -08:00
aparziale a29a3988d6 docs(docs-infra): Fix broken link
Fix broken link side effects

Fix #66051
2025-12-15 11:33:56 -08:00
SkyZeroZx b043c7490f docs: update code block syntax highlighting in documentation & fixed identation 2025-12-15 11:33:30 -08:00
SkyZeroZx 23fbe5cf9f docs: replace @debugging tag with proper Markdown syntax 2025-12-15 10:00:59 -08:00
Axel Jäger a1f5f52880 docs(forms): include update() in example for updating form value 2025-12-15 10:00:28 -08:00
Angular Robot 4c1d229771 build: update all non-major dependencies
See associated pull request for more information.
2025-12-15 09:55:59 -08:00
Angular Robot 48c4082c59 build: update all github actions
See associated pull request for more information.
2025-12-15 09:55:25 -08:00
Matthieu Riegler f530b777b9 ci: enable embeddedLanguageFormatting for prettier
This allows to format inline templates
2025-12-15 09:54:48 -08:00
hawkgs 83691704b7 refactor(devtools): slightly optimize extension initialization messaging
- Stop indefinite `detectAngular` messages after the backend is installed.
- Do not attempt handshake with the BE (from content scripts) until it's installed.
2025-12-15 09:52:52 -08:00
SkyZeroZx bb65520991 docs: Adds documentation for the NG0919 error
Adds a new documentation page for the NG0919 error, which indicates a circular dependency in Angular applications.

fixes  #65968
2025-12-15 09:52:16 -08:00
Joey Perrott 5f01f121df ci: update google sync configuration to not include package.json
We don't use the package.json files within google3 and they don't need to be marked for sync
2025-12-15 09:51:19 -08:00
Matthieu Riegler b5205c7c42 docs(docs-infra): throw when rendering absolute links to adev in our guides
This is to prevent any further regressions in the future
2025-12-15 09:45:04 -08:00
Andrew Kushnir 8243bb3064 Revert "refactor(compiler): remove unnecessary sanitization for safe attributes"
This reverts commit 128aef0ede.
2025-12-12 12:59:47 -08:00
Angular Robot ff4fa14463 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-12 11:40:50 -08:00
Matthieu Riegler be5dbf45ba docs: update guidelines.md to match best-practices.md
fixes #65953
2025-12-12 10:10:33 -08:00
Angular Robot 480c4dc263 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-12 10:05:23 -08:00
Angular Robot 16ab98fcf4 build: update dependency @actions/core to v2
See associated pull request for more information.
2025-12-12 09:52:01 -08:00
Miles Malerba 348f149e8b feat(forms): pass field directive to class config
Updates signal forms to pass the full `Field` directive to the class
configuration functions, rather than just the state. This allows
developers to take the element as well as the state into consideration
when deciding classes to apply.

Closes #65762

BREAKING CHANGE: The shape of `SignalFormsConfig.classes` has changed

Previously each function in the `classes` map took a `FieldState`. Now
it takes a `Field` directive.

For example if you previously had:
```
provideSignalFormsConfig({
  classes: {
    'my-valid': (state) => state.valid()
  }
})
```

You would need to update to:
```
provideSignalFormsConfig({
  classes: {
    'my-valid': ({state}) => state().valid()
  }
})
```
2025-12-12 08:07:53 -08:00
Kristiyan Kostadinov 7be4ddef1c fix(core): throw better errors for potential circular references
Currently circular references in user code manifest themselves with an error like `Cannot read properties of undefined (reading 'ɵcmp')`. This is a bit cryptic so these changes add an assertion mentioning circular references.

Relates to #65917.
2025-12-12 08:06:26 -08:00
Alan Agius 128aef0ede refactor(compiler): remove unnecessary sanitization for safe attributes
Remove sanitization for attributes that cannot execute code (e.g. `javascript: URIs`).
2025-12-12 08:05:58 -08:00
SkyZeroZx 8485579649 refactor(common): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary declarations from injection tokens
2025-12-12 08:05:30 -08:00
hawkgs 1a9bfa8542 fix(devtools): last supported version
Bump to 12, as the message suggests.
2025-12-12 08:04:50 -08:00
hawkgs aee536c8ca refactor(devtools): improve the look of app state screens
Improve the look of "app not detected", "unsupported version" and "prod app not supported" screens.
2025-12-12 08:04:50 -08:00
Angular Robot 06fb97abf9 build: update dependency firebase-tools to v15
See associated pull request for more information.
2025-12-12 08:03:11 -08:00
Angular Robot c8a46650a3 build: update bazel dependencies
See associated pull request for more information.
2025-12-12 08:02:24 -08:00
Angular Robot ae6bbe9c43 build: update all non-major dependencies
See associated pull request for more information.
2025-12-12 08:01:56 -08:00
Angular Robot 8ef0009ffe docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-12 08:00:41 -08:00
Angular Robot 23547f04e9 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-11 17:18:17 -08:00
Shuaib Hasan Akib 63538524bc docs: simplify example headers by showing only the file name
Removed redundant `src/app/` prefixes from <docs-code> headers to make
examples cleaner and easier to read. The full path remains available via
the `path` attribute, so the shortened headers improve clarity without
losing context.
2025-12-11 17:17:05 -08:00
Andrew Xue ff68806c67 docs(docs-infra): add primary color vars for tutorial button 2025-12-11 17:11:27 -08:00
Leon Senft f0ad30cce6 docs(forms): fix broken example
As written, the example rewrote the input value as the user edited it,
causing all kinds of confusing behavior which rendered the input nearly
unusable. While such implementations are possible, they require great
care to manage the cursor position while editing. For the sake of
brevity, this example now only updates the model on `blur` events; once
the user is done editing.
2025-12-11 17:10:51 -08:00
SkyZeroZx c4e7ac1b81 docs: fixed tutorial steps with identation formatting 2025-12-11 17:10:14 -08:00
SkyZeroZx a8fac4ce3b docs(docs-infra): Fix prefer/avoid rule matching with word boundaries
Improve code block rule detection by adding word-boundary anchors.
Also update indentation for consistency.
2025-12-11 17:08:50 -08:00
Angular Robot 567172b5bc build: update peter-evans/create-pull-request action to v8
See associated pull request for more information.
2025-12-11 17:07:42 -08:00
SkyZeroZx ef45637ca8 docs(language-service): add link to hydration guide in built-in names documentation
Adds link to hydration guide for `hydrate` keyword
2025-12-11 17:06:35 -08:00
Charles 97c7025d7d docs: overhaul unit testing overview guide
This commit introduces a series of improvements to the unit testing overview guide to enhance clarity, organization, and accuracy.
2025-12-11 17:06:00 -08:00
Miles Malerba fba0c88c9e docs(forms): add guide on designing form models
Adds a new guide on designing form model for signal forms
2025-12-11 17:04:11 -08:00
Alex Rickabaugh 7c234486e6 release: cut the v21.1.0-next.3 release 2025-12-11 15:48:59 -08:00
Alex Rickabaugh bf86f5364f docs: release notes for the v21.0.5 release 2025-12-11 15:43:22 -08:00
Miles Malerba d0097f7d0c fix(forms): fix signal forms type error
Removes the `implements` clause on the `Field` directive since it is
causing type errors for people.
2025-12-11 15:33:12 -08:00
SkyZeroZx 4f6014a756 fix(core): avoid false-positive deprecation when using InjectionToken with factory only
Prevents the deprecation warning that was incorrectly triggered when
defining an InjectionToken with only a `factory`, which correctly
defaults to the `root` scope.
2025-12-11 11:20:11 -08:00
Alex Rickabaugh 16364514e3 release: cut the v21.1.0-next.2 release 2025-12-10 16:59:48 -08:00
Alex Rickabaugh d343ff34a3 docs: release notes for the v21.0.4 release 2025-12-10 16:50:42 -08:00
Joey Perrott a52c834536 build: update ng-dev to latest version
Update to the latest version of ng-dev
2025-12-10 16:44:10 -08:00
Angular Robot d0c3806915 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-10 13:20:56 -08:00
jnizet c63ef9cb6a docs: fix typos and clarify root effect 2025-12-10 12:40:59 -08:00
Chathulanka Gamage 7674ada620 docs: update control-flow.md to replace else-if with else if
fix incorrect hyphenated form "else-if" and update documentation to match correct syntax "else if"
2025-12-10 12:39:21 -08:00
Angular Robot af6c01f9fb build: update pnpm to v10.25.0
See associated pull request for more information.
2025-12-10 12:33:25 -08:00
Angular Robot 0ef185d015 build: update all non-major dependencies
See associated pull request for more information.
2025-12-10 12:28:42 -08:00
Angular Robot 25c569cf99 build: update all github actions
See associated pull request for more information.
2025-12-10 12:28:01 -08:00
Michael Small 3ab17876ba docs: add 'new' to page 'Side effects for non-reactive APIs' 2025-12-10 12:27:25 -08:00
Matthieu Riegler c429e701fc refactor: spread rules with glob syntax
prettierignore does not support the glob syntax for multiple extensions.
2025-12-10 12:26:53 -08:00
SkyZeroZx bff2dcb93c docs: update forwardRef usage with signals and add HostListener note 2025-12-10 12:23:29 -08:00
Angular Robot 28338c44b3 build: lock file maintenance
See associated pull request for more information.
2025-12-10 12:21:26 -08:00
Jan Martin 954c546273 release: bump Angular DevTools version to 1.6.3 2025-12-10 11:37:13 -08:00
Andrew Scott 5988bdedae refactor(core): Add transition.to property to FakeNavigation
This matches the upstream changes in https://github.com/whatwg/html/commit/f19930f98afeb7565cfc1cbc6a1d4a2086535bca
2025-12-10 10:18:08 -08:00
diegoinost02 9dd08c571a docs(forms): document array item validation in Signal Forms 2025-12-10 10:17:27 -08:00
diegoinost02 e6865af8f1 docs(forms): add signal forms documentation for validating array items 2025-12-10 10:17:27 -08:00
SkyZeroZx 15e3407dab docs(docs-infra): Fixes the visibility of the copy link button in API documentation headings
Fixes the visibility of the copy link button in API documentation headings.
The button now appears on hover, improving the user experience.
2025-12-10 10:15:59 -08:00
Shuaib Hasan Akib 1c6049584e docs: hide menu icons from screen readers in aria example
Add aria-hidden="true" to decorative icon elements in the ARIA menu documentation
example to prevent screen readers from announcing both icon names and labels.
This improves the accessibility experience by ensuring only meaningful text
is announced to screen reader users.

Fixes: #65768
2025-12-10 10:09:35 -08:00
Matthieu Riegler 14713d0992 fix(forms): allow resetting with empty string
Both empty string and null values should be accepted when resetting

fixes #65949
2025-12-10 10:04:54 -08:00
Shuaib Hasan Akib d0a34a6ca5 docs: use fenced code blocks and format examples
Replaces custom docs-code blocks with fenced Markdown code blocks and reformats examples to improve readability, consistency, and copy-paste behavior.
2025-12-10 09:35:50 -08:00
Shuaib Hasan Akib 1f29577077 fix(docs-infra): parse linenums attribute from triple backtick metadata
The triple backtick code block parser now extracts the linenums attribute
from metadata and applies it to enable line number display in code examples
2025-12-10 09:31:44 -08:00
Andrew Scott d355205198 refactor(core): match spec updates for FakeNavigation
Updates FakeNavigation based on updates in https://github.com/whatwg/html/pull/11952
2025-12-10 08:19:23 -08:00
Matthieu Riegler 835a643161 refactor(core): Support Error like object for on resource errors.
Error like object will be treated as errors.

Related to #61861
2025-12-10 08:18:17 -08:00
Matthieu Riegler 25b7948307 ci: fix deployement of previews
By pulling the fix angular/dev-infra/pull/3301
2025-12-10 08:17:47 -08:00
Joey Perrott 9ace7d7a0d build: add the ignore all rc files flag when running bazel info
Due to a bug in bazel we need to ignore all of the rc files when running bazel info commands
2025-12-09 13:44:45 -08:00
Matthieu Riegler 827f5a6fd5 docs: create a separate effect guide
This also includes details about `afterRenderEffect`

WIP.

fixes #63757
2025-12-09 13:11:00 -08:00
Angular Robot 6a3f6be6ed build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-09 13:05:03 -08:00
Kristiyan Kostadinov 8a3f3a91cf fix(compiler-cli): expand type for native controls with a dynamic type
We recently allowed users to have a dynamic input `type` with signal forms, but the logic that infers the value type falls back to `string` even though in theory it can be any of the other types.

These changes expand the inferred type to `string | number | boolean | Date | null` if we detect a dynamic `type` binding.
2025-12-09 13:01:30 -08:00
kirjs 179b4cba67 fix(forms): Reuse key in parent in compat structure
This fixes the "Compat nodes do not use keyInParent." error when trying to bind compatField.
2025-12-09 12:59:22 -08:00
arturovt 80dbd74ae8 refactor(core): wrap operationsCounter calls with ngDevMode checks
Wrap operationsCounter method calls (recordCreate, recordDestroy, reset)
with ngDevMode guards to ensure they are tree-shaken in production builds.

This aligns with the existing pattern where operationsCounter is only
initialized in development mode, and eliminates unnecessary method call
overhead in production.

The optional chaining (?.) is retained as TypeScript doesn't narrow types
based on ngDevMode checks, but the entire expression will be removed during
production builds.
2025-12-09 10:38:39 -08:00
Matthieu Riegler 8199945637 refactor(core): add dedicated deprecated signatures for providedIn: any / NgModule.
Those were deprecated by #47616 back in v15.

fixes #65923
2025-12-09 10:38:09 -08:00
Angular Robot feb1278b5c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-09 10:37:32 -08:00
Miles Malerba aff8b248b3 feat(forms): expose element on signal forms Field directive
This allows for easier focusing of the relevant element based on the
`field` property of a `ValidationError`
2025-12-09 09:47:51 -08:00
Andrew Scott 200d923436 docs: Update tutorial last step to use markForCheck
Ideally this tutorial would have used signals but didn't. That's a bigger change than
we are able to make right now and there are other things we would like
to update at the same time. This fix is a temporary patch to the
existing content until there is time to redo the tutorial and videos
entirely.

fixes #65863
2025-12-09 09:39:31 -08:00
Angular Robot 95dfca7254 build: update bazel dependencies
See associated pull request for more information.
2025-12-09 09:38:19 -08:00
Matthieu Riegler 75fe8f8af9 refactor(upgrade): deprecate VERSION export
users should use the entry from `upgrade/static`.

DEPRECATED: `VERSION` from `@angular/upgrade` is deprecated. Please use the entry from `@angular/upgrade/static` instead.
2025-12-09 09:26:02 -08:00
SkyZeroZx 9a6b8e0315 docs(docs-infra): Refactors tutorial generation and updates ng-container docs
Updates the `ng-container` documentation page to use the correct `angular-html` code format and removes an unused CLI documentation file.
2025-12-09 09:25:29 -08:00
Kristiyan Kostadinov ae1c0dc490 perf(compiler): chain query creation instructions
We always emit the query creation instructions in a group which makes them good candidates for chaining.
2025-12-09 09:24:36 -08:00
Andrew Scott c9dfc6c484 fix(vscode-extension): Show warning if multiple versions of Angular are detected in workspace
This shows a more prominent warning when multiple versions of Angular
are detected in the workspace and we are forced to choose one to use for
the language server. This also logs those versions with their locations
and directs the user to view the output panel.

fixes #65466
2025-12-09 09:23:47 -08:00
Matthieu Riegler 3411638f65 docs(docs-infra): prefer/avoid code block styling
fixes #65866
2025-12-09 09:23:12 -08:00
Miles Malerba ebc5c2b083 feat(forms): redo the signal forms metadata API
This PR makes a number of changes to the metadata API to address design
flaws in the previous API. Some of the changes include:

- Replaces the previous `MetadataKey` and `AggregateMetadataKey` with a
  single unified `MetadataKey` that is used for all metadata.
- The new `MetadataKey` is only defined for fields that explicitly set
  it in their schema logic
- All metadata now has reducer / aggregate behavior
- The new `MetadataKey` has an option to create a managed key which
  wraps the result of its computed aggregate into some other structure
  such as a `Resource` or `linkedSignal`
- There are now two APIs to create metadata keys
  - `createMetadataKey` for pure computed metadata
  - `createManagedMetadataKey` for metadata that manages its computation
    internally
2025-12-09 09:21:41 -08:00
Joey Perrott 349133374f build: update repository to use node 22.21.1 in bazel
The repository was updated to use node 22.21.1 via nvm, but bazel had not been updated to match
2025-12-09 09:19:13 -08:00
Shuaib Hasan Akib 4b9fffaa79 docs(docs-infra): hide trailing empty line in code examples
Add CSS rule to hide the last empty line in code blocks to prevent displaying
unnecessary empty lines when source files end with a newline character.
The empty line remains in the DOM for proper copy-paste functionality.
2025-12-09 09:17:41 -08:00
Gouvernathor 5607f513a7 docs(common): Explain how ::ng-deep works
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-12-09 09:16:45 -08:00
cexbrayat 9fe9566581 fix(forms): add signals for dirty, hidden, and pending states in custom controls
FormUiControl states that hidden, pending and dirty will be bind in custom controls, but this is currently not the case.

Fixes #65575
2025-12-08 10:30:43 -08:00
Anuj Chhajed 96b79fc393 refactor(core): correct all typeof ngDevMode comparison patterns introduced by #63875
This change replaces all remaining occurrences of `typeof ngDevMode !== undefined`
with the correct `typeof ngDevMode !== 'undefined'` form. This aligns the codebase
with JavaScript typeof semantics and maintains consistency with other Angular code.
2025-12-08 10:30:01 -08:00
Miles Malerba efde94a525 refactor: followup cleanup for #65758 fallout
Fixes some issues left behind by recent refactor
2025-12-08 10:27:59 -08:00
mahmoudaboueleneen bad758d4ea docs: fix typo in 'components' word in host elements guide 2025-12-08 10:24:05 -08:00
Shuaib Hasan Akib 5fd75410a9 refactor(core): use proper type for stringifyTypeFromDebugify parameter
Replace the 'any' type with ClassDebugInfo for the debugInfo parameter in
stringifyTypeFromDebugInfo function. This removes the TODO comment that was
tracking the need for proper typing without creating circular dependencies.

The change improves type safety while avoiding circular imports since
stringify_utils.ts doesn't export anything that definition.ts imports.
2025-12-08 10:23:16 -08:00
Joey Perrott aa92f19307 build: update to bazel version 8.4.2
Update bazel to use version 8.4.2
2025-12-08 10:21:59 -08:00
Alan Agius 22eda59a31 build: ignore adev generated content JSON files in Prettier
These files are auto generated.
2025-12-08 10:20:29 -08:00
Matthieu Riegler 9d1d742f1b build: enable angular formatting on all html files
This should also be safe on any html file that isn't an angular template
2025-12-08 10:19:45 -08:00
Alessio Pelliccione 253dc95d63 feat(docs-infra): add complexity level badge
Introduces the new complexity badge in recommendation cards.
The implementation utilizes CSS variables and `color-mix` to efficiently
handle color themes (Basic, Medium, Advanced) and dark mode support.

Closes #65378
2025-12-08 10:05:45 -08:00
Angular Robot dd47c57635 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-08 09:37:30 -08:00
SkyZeroZx 70e024ea80 docs: add attribute binding reference in accessibility guide 2025-12-08 09:24:25 -08:00
Shuaib Hasan Akib c9cba99407 docs: add missing page title to update guide
Fixes the missing page title so the update guide displays a proper heading.
2025-12-08 09:23:23 -08:00
SkyZeroZx ccf31349c5 docs: Updates tutorial syntaxis highlight 2025-12-08 09:21:44 -08:00
hawkgs 0c4a5c599d fix(devtools): prod app detected screen
Do not call `getSupportedApis` in a prod app since it throws an error due to the absence of `ng`, which prevents the FE from getting the `ngAvailability` message and, respectively, the proper info screen that DevTools cannot be used on a prod app.
2025-12-08 09:21:16 -08:00
Angular Robot 7efc6f0086 build: update all non-major dependencies
See associated pull request for more information.
2025-12-08 09:20:18 -08:00
Angular Robot aecd166bec build: update dependency cldr to v8
See associated pull request for more information.
2025-12-08 09:18:46 -08:00
Alan Agius 5a38aed388 build: move NG_FORCE_TTY environment variable
This moved the `NG_FORCE_TTY` from individual `ng_web_app` rules to a global Bazel build flag as this is also needed for integration tests that under the hood run `ng serve` .
2025-12-08 09:12:39 -08:00
SkyZeroZx 6f2ef918e3 docs: add documentation HOST_TAG_NAME 2025-12-08 09:08:50 -08:00
Jessica Janiuk ce4ddf4b47 docs: Update contributing guidelines
This commit updates the CONTRIBUTING.md file to provide clearer
guidelines for new contributors, including sections on code style,
testing, and the pull request process.
2025-12-08 09:06:25 -08:00
Miles Malerba cda56db20f test: fix broken adev tests
Fixes a broken adev tests and enables another one that seems to work
fine now
2025-12-08 09:04:50 -08:00
SkyZeroZx 7e1e396a00 docs: add documentation for HTTP_TRANSFER_CACHE_ORIGIN_MAP 2025-12-08 09:00:08 -08:00
jnizet 28017c1c1a docs: add browser-mode option description to Vitest migration guide 2025-12-08 08:50:27 -08:00
SkyZeroZx a4563044ad docs(docs-infra): fix hideCopy option to code snippets
Adds the ability to hide the copy button on code snippets.

Updates documentation to use the new `hideCopy` option with the new
markdown code fence syntax.
2025-12-08 08:48:20 -08:00
Shuaib Hasan Akib 45aa63308e docs: fix lazy loading documentation reference
Updates broken or outdated references in the lazy loading guide.

Fixes: #65906
2025-12-08 08:47:40 -08:00
Alan Agius d2ac93d5ca build: format manifest files after updating its version
This commit run the formatter during the release.
2025-12-08 08:43:55 -08:00
Alan Agius 52aac81829 refactor: move Prettier ignore rules from ng-dev config to .prettierignore
This moves all prettier ignore rules to the prettier config
2025-12-08 08:43:06 -08:00
Matthieu Riegler 13bc1bc721 docs(docs-infra): fix next version dropdown
fixes #65912
2025-12-08 08:42:19 -08:00
Matthieu Riegler 81cf319534 docs(docs-infra): expose VERSION from @angular/upgrade
The missing src was responsible for not exposing the symbols during the doc extraction.

fixes #65916
2025-12-08 08:41:35 -08:00
Joey Perrott aba8fbe5cd build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-08 08:40:42 -08:00
kirjs 789f91bd4f feat(docs-infra): forward preview error locations
Intercept the WebContainer preview overlay open-in-editor requests and relay them to the editor via postMessage so errors open the matching file.
2025-12-04 11:45:51 -08:00
kirjs 21b995f4b7 feat(docs-infra): allow navigating to editor error locations
This shows up in a little pop-up, and is clickable now, and leads to exact line
2025-12-04 11:45:51 -08:00
Georgi Serev 87e05e935c refactor(devtools): create a reusable component for all prop mat-trees
Create a reusable component for object property inspection.
2025-12-04 11:44:00 -08:00
diegoinost02 e311f3df72 docs: clarify linkedSignal update behavior
Updates the linkedSignal documentation to specify that it updates its value when the source changes or when any signal referenced in the computation changes, ensuring the description accurately reflects its behavior.
2025-12-04 11:42:46 -08:00
Shuaib Hasan Akib abcd6b5bfb docs: update rxResource changes in updated page
Add both `request` and `loader` changes in rxResource section
2025-12-04 11:41:36 -08:00
SkyZeroZx 3adb091c1a docs: update zone pollution guide highlight syntax 2025-12-04 11:40:01 -08:00
Kirill Cherkashin 5be33048cc refactor(forms): Break logic.ts into separate files
This would make it easier to navigate
2025-12-04 11:33:20 -08:00
Nakul Sharma 0bb8924ab6 refactor(core): use getComponentDef in stringify_utils
- Use getComponentDef in debugStringifyTypeForError to clean up TODO
- Remove outdated comment from stringify_utils
2025-12-04 11:32:12 -08:00
Angular Robot 009ca4bc70 build: update all non-major dependencies
See associated pull request for more information.
2025-12-04 11:31:29 -08:00
hawkgs 1d431a9637 fix(devtools): router tree not being rendered
Convert the `TreeVisualizer` to a signal, in the `TreeVisualizerComponent`, to ensure that the router tree render effect is always called; Use explicit `afterNextRender` phases.
2025-12-04 11:30:14 -08:00
Andrew Scott 37598cf6fe refactor(router): Adjust push/replace behavior to account for navigation API timing issues
There is a bug (?) in all browsers where the timing of the entry change
is delayed when a navigation is initiated by a click on a link via user
interaction. In this case, we need to ensure we do a 'push' navigation
rather than a 'replace'.
Programatically doing element.click() does not reproduce
this behavior, so adding a test for this is difficult (would require
webdriver).
2025-12-04 11:29:38 -08:00
Angular Robot 5fa407530c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-04 11:28:51 -08:00
Alex Rickabaugh b96f65a963 fix(forms): memoize reads of child fields in signal forms (#65802)
Previously, navigating a `FieldTree` in signal forms involved reactive reads
of the value of the parent field(s), both directly and via `.childrenMap()`.

This meant that on _any_ change to the value of a field, reactive
notifications would trigger updates of computeds, reruns of effects, etc.
So for example, this effect would run on every change to the form:

```ts
const f = form(signal({data: 'abc', unrelated: 0}));
effect(() => {
  // accessing f.data incurs a dependency on f().value() which changes
  // on every change in the whole form
  console.log(f.data().value());
});
```

This is deeply counterintuitive and troublesome when attempting to write
effect logic, and also results in `computed`s unnecessarily updating.

This change introduces the concept of a "reader" computed, which memoizes
the access of a field at a given key via the reactive graph. With this, the
same `f.data` access above now depends on the `data` reader in `f` only,
which is effectively a constant computed. As a result, the effect only
reruns on changes to `data`'s value, as intended.

PR Close #65802
2025-12-03 12:52:42 -08:00
Alex Rickabaugh 37472e9185 refactor(forms): simplify child field creation (#65802)
Previously, several values were being passed into the creation of
`FieldNodeStructure`s that were only used in the creation of child nodes.
Separately, we also passed a `createChildNode` function which these values
were passed back into.

Instead, this moves the small bit of logic from structure.ts behind the
`createChildNode` callback, which reduces the passing of values back-and-
forth and gives `createChildNode` a much more suitable signature.

PR Close #65802
2025-12-03 12:52:42 -08:00
cexbrayat fc23fcdd3b build: disable assistant_to_the_branch_manager on forks
It currently fails as it is triggered on push, but requires an angular-robot-key that forks don't have.
2025-12-03 12:33:13 -08:00
Joey Perrott eebcaf49f1 ci: use defined ng-dev config for deploying docs site
Use the repo defined ng-dev configuration for deploying the docs site
2025-12-03 11:26:05 -08:00
Shuaib Hasan Akib 7f8ffa3304 fix(docs-infra): prevent readonly TypeScript keyword from being linked
This updates the docs infrastructure to avoid incorrectly linking the `readonly` keyword in TypeScript examples.

Fixes #65632
2025-12-03 16:30:51 +01:00
Pawel Kozlowski 13c0d451a5 release: cut the v21.1.0-next.1 release 2025-12-03 16:24:33 +01:00
Pawel Kozlowski ffd7a9b7ea docs: release notes for the v21.0.3 release 2025-12-03 16:20:28 +01:00
SkyZeroZx 7d1e502345 feat(forms): Allows transforms on FormUiControl signals
Extends the `FormUiControl` interface to allow `InputSignalWithTransform` in addition to `InputSignal` for its properties.

Fixes #65756
2025-12-03 15:13:01 +01:00
Leon Senft e6d5632a30 perf(core): tree shake unused dynamic [field] binding instructions (#65599)
Move the instructions used to dynamically bind a `Field` directive to a
form control onto the `Field` itself. This way the instructions are only
retained if the app uses the `Field` directive.

PR Close #65599
2025-12-03 15:10:49 +01:00
Leon Senft cd7ae7e2ce fix(forms): support dynamic [field] bindings (#65599)
Support binding a `Field` directive to a component created dynamically
with `createComponent()`.

Fix #64632

PR Close #65599
2025-12-03 15:10:49 +01:00
Kristiyan Kostadinov 886cf6c452 fix(core): unable to inject viewProviders when host directive with providers is present
When registering providers, the DI system assumes that `viewProviders` are registered before plain `providers`. This was reinforced by components always being first in the array of directive matches, only one component being allowed per node and the fact that only components can have `viewProviders`.

This breaks down if there are host directives with `providers` on the component, because they'll execute earlier, throwing off the order of operations.

These changes fix the issue by separating out the resolvers for `viewProviders` and plain `providers` and explicitly running the component's `viewProviders` resolver before any others. This also has the benefit of not attempting to resolve `viewProviders` for directives which are guaranteed not to have them.

Fixes #65724.
2025-12-03 15:09:48 +01:00
Angular Robot d6087841e3 build: update all github actions
See associated pull request for more information.
2025-12-03 14:08:09 +01:00
Angular Robot dfd7d3bf6b build: lock file maintenance
See associated pull request for more information.
2025-12-03 13:38:40 +01:00
Alan Agius 3e89577655 release: bump Angular DevTools version to 1.6.2 2025-12-03 13:18:27 +01:00
Alan Agius 0659d11c85 fix(http): enable XSRF protection for same-origin absolute URLs
Previously, the XSRF interceptor only added the XSRF token to requests with relative URLs.
This commit updates the interceptor to also add the token to requests with absolute URLs, provided they match the current origin.
2025-12-03 12:19:43 +01:00
Kristiyan Kostadinov 6773d3b97d fix(compiler-cli): check that field radio button values are strings
Adds some type checking code which verifies that the bound `value` on a `Field` radio button is a string.

Fixes #65726.
2025-12-03 12:18:57 +01:00
arturovt b74a0693f2 fix(router): handle errors from view transition finished promise
This commit adds a `.catch()` handler to `transition.finished` from `document.startViewTransition` to prevent unhandled promise rejections. The finished promise can reject with `TimeoutError` or `InvalidStateError` when transitions fail during or after the animation phase.

Based on the Blink source code, the `finished` promise can reject with:
* `TimeoutError`: "Transition was aborted because of timeout in DOM update"
* `InvalidStateError`: "Transition was aborted because of invalid state"

This may happen when the DOM update phase exceeds the browser's internal timeout threshold.
2025-12-03 12:16:57 +01:00
Joey Perrott 819b640c2d docs: prevent showing typescript diagnostic errors until the node runtime reaches a ready state
Prevent the overlay box showing diagnostics errors until after the initial setup of the node runtime is completed.

Fixes #52649
2025-12-03 11:54:53 +01:00
Pawel Kozlowski 13353bff8b Revert "build: update cross-repo angular dependencies"
This reverts commit 64f1f60943.
2025-12-03 11:06:54 +01:00
Pawel Kozlowski b158acb95c Revert "build: update bazel dependencies"
This reverts commit e26aa86aa5.
2025-12-03 11:06:54 +01:00
Angular Robot e26aa86aa5 build: update bazel dependencies
See associated pull request for more information.
2025-12-03 10:13:47 +01:00
Joey Perrott 64f1f60943 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-03 10:10:11 +01:00
hawkgs a5efc35ddf fix(devtools): router tree callables view source functionality
Fix a set of issues with the callable search algorithm and refactor it.
2025-12-03 10:07:20 +01:00
Joey Perrott 34bedae101 docs: rename visibleRegion to region
Use the attribute region instead of visibleRegion
2025-12-03 10:06:01 +01:00
Joey Perrott 9b3b5fb4cf refactor(docs-infra): extract only the visibleRegion
Previously we extracted the regions and only made the visible region visible on the page, but since there is not a need for the
non-visible code to be presented, we don't need to include it in the generated code snippets.
2025-12-03 10:06:01 +01:00
Alon Mishne a892f2824c docs: Add build and devserver tools to MCP docs 2025-12-03 10:04:37 +01:00
Kirill Cherkashin 29223c440f docs: Update adev/src/content/guide/forms/signals/models.md
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-12-02 19:30:52 +01:00
kirjs 1fd8303659 docs(forms): Polish the docs
- Recommend using form/fields to set the value
- Drop "Dynamic field addition" section as for the above reason
2025-12-02 19:30:52 +01:00
Andrew Scott a0ad5d4b2b test(router): Add tests for support of path params before/after a wildcard
This adds additional tests following the initial implementation in #64737 that cover
the use-case of path parameters before and after the wildcard segment.
2025-12-02 16:46:17 +01:00
Andrew Scott fd65dc5d53 refactor(router): add comment about scroll/focus
Add consideration for future behavior in the completion of the navigation event.
2025-12-02 16:45:17 +01:00
Andrew Scott cc03254b12 refactor(router): Avoid aborting traversal navigations
Unnecessarily aborting traversal navigations will break focus and scroll
restoration. We need to keep them open rather than replacing them with
an identical router-initiated navigation.
2025-12-02 16:45:17 +01:00
Andrew Scott 9914926b0d refactor(router): Clean up cancellation event handling
cleans up some handling of cancellation events with a shared helper.
2025-12-02 16:45:17 +01:00
Andrew Scott b7d21e209a refactor(router): compress synchronous end to router navigation to single operator
The end of the Router navigation is a block of synchronous logic that
can be compressed into a single operator rather than splitting it across
several, making it harder to step through. The only benefit from the
split is automatic unsubscribe/cancellation, which we can replicate
with an additional 'shouldContinue' check before proceeding.
2025-12-02 16:44:01 +01:00
Kristiyan Kostadinov e30e61b789 fix(compiler-cli): avoid allocating an object for signals in production mode
Currently when the signal debug name transform sees something like `const foo = signal(0);`, it transforms the signal into `signal(0, {...(ngDevMode ? { debugName: 'foo' } : {})})`. After minification this becomes `signal(0, {})` which will allocate memory for the empty object literal.

These changes rework the logic to produce `signal(0, ...(ngDevMode ? [{ debugName: 'foo' }] : []))` which will be fully tree shaken away to `signal(0)`.
2025-12-02 15:06:51 +01:00
Jessica Janiuk d8ab83ca82 fix(core): run animation queue in environment injector context
In the case that a component injector is destroyed before the animation
queue runs, the animation queue would fail to run because it was using a
destroyed injector. This commit changes the animation queue to run in the
context of the EnvironmentInjector, which is not destroyed until the app
is destroyed.

fixes: #65628
2025-12-02 15:05:17 +01:00
Matthieu Riegler f35b2ef47c refactor(compiler): Generate the controlCreate instruction after the native element has been created
This is necessary to exclude a race condition where the MutationObserver initialized by the instruction fired before the inputs are binded.

fixes #65678
2025-12-02 12:59:49 +01:00
Matthieu Riegler a784995a98 docs(docs-infra): Show examples on function overloads 2025-12-02 12:13:11 +01:00
Angular Robot 19a36954c1 build: update dependency chokidar to v5
See associated pull request for more information.
2025-12-02 12:11:10 +01:00
Angular Robot 510151c152 build: update all non-major dependencies
See associated pull request for more information.
2025-12-02 12:06:55 +01:00
Georgi Serev 2eaa4d54ad fix(devtools): hide profiler node details when the frame is changed
Hide the details panel when the user selects a new frame.
2025-12-02 12:05:54 +01:00
Joey Perrott a16a70ca74 refactor(docs-infra): move header id tracking into RendererContext
Move the header id tracking into the renderer context rather than a global state.  Since the RendererContext is
initialized for each execution of the marked parser, we can store the context of which header ids have been seen within
a single page there which allows us to run these parse interactions in parallel.
2025-12-02 12:03:34 +01:00
Joey Perrott 8b296543ae refactor(docs-infra): transform all headings using the built in transformer
Rather than manually calling the transformer we use for headings from within a render function, we now properly call into the Renderer to do them
via the tokens they are require instead.  This is being done to allow us to have a per Renderer instance of state instead of a global state, which will
allow us to run marked async and hopefully speed up the pipeline
2025-12-02 12:03:34 +01:00
Tim Deschryver 680de24c3c docs: fix documentation link for currentNavigation method 2025-12-02 12:02:24 +01:00
SkyZeroZx 0c7508bf56 docs: add platform-specific implementation and helpers 2025-12-02 12:00:01 +01:00
Angular Robot c5a3bbbd91 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-02 10:48:06 +01:00
SkyZeroZx 03c04d4c83 docs: improve formatting and fixed numeration issue in attribute directives guide 2025-12-02 10:45:47 +01:00
SkyZeroZx 7fd5890d48 docs: update syntax highlighting in component documentation 2025-12-02 10:38:16 +01:00
Gaston da99b5d1d0 docs: add FormArrayDirective documentation to reactive forms guide
Update adev/src/content/guide/forms/reactive-forms.md

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-12-02 10:36:13 +01:00
Matthieu Riegler bc93b398af docs: fix submit example
`async` keyword is required for the `submit` callback
2025-12-02 10:35:06 +01:00
Angular Robot 71b613177f build: update pnpm to v10.24.0
See associated pull request for more information.
2025-12-01 19:54:46 +01:00
SkyZeroZx aea2465a59 docs: update notes to use consistent formatting in various guides 2025-12-01 19:33:32 +01:00
Angular Robot 4e1d1ec85c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-01 19:32:28 +01:00
Alan Agius 25bf417d57 ci: include dev-app files from pullapprove checks
At dev-app to pullaprove
2025-12-01 19:24:22 +01:00
Alan Agius 1dc8b60ea2 build: disable Angular CLI cache
This can break things in bazel
2025-12-01 19:24:22 +01:00
Shuaib Hasan Akib 3731f07579 docs: format typescript examples and replace <docs-code> with fenced code blocks
Replaced <docs-code language="typescript"  to improved
readability and consistency across documentation.
2025-12-01 19:20:19 +01:00
SkyZeroZx 4e89bc6244 feat(docs-infra): Adds copy link to anchor functionality
Enables copying a direct link to any section by clicking its anchor. Also updates the aria-label to remove the code tag
2025-12-01 19:19:31 +01:00
Angular Robot c0d8be7fa1 build: update rules_angular digest to 9409450
See associated pull request for more information.
2025-12-01 19:18:42 +01:00
til0r 721080aaa9 docs: fix npm link URL in creating-libraries guide
- Update `npm link` to the official docs URL.
- Keep `pnpm link` reference intact
2025-12-01 18:58:33 +01:00
Pratyush Swain 27d1ccb2df docs(docs-infra): update NG0910 documentation with new control flow 2025-12-01 18:53:56 +01:00
Shuaib Hasan Akib 7b33554d24 docs: link inject function to its API reference
Replaced plain code-form usage of `inject` with a link to the
API docs (`/api/core/inject`) to improve navigation and
help readers access detailed reference information more easily.
2025-12-01 18:53:04 +01:00
aparziale a850987519 docs(docs-infra): Fix Incorrect indentation
Fix Incorrect indentation in hierarchical dependency injection guide

Fix #65722
2025-12-01 18:52:17 +01:00
Shuaib Hasan Akib a464406ebf docs: update examples to use self-closing tags for consistency with recommended practices
Updated various template examples to use self-closing component tags
(e.g., `<my-comp />`) instead of the expanded form (`<my-comp></my-comp>`),
improving consistency across the documentation and aligning with current
Angular style recommendations.
2025-12-01 18:50:50 +01:00
aparziale 7a39565916 docs(docs-infra): Fix Drag handle SVG is not visible
Fix Drag handle SVG is not visible. The css style overrides the default behavior

Fixes #65545
2025-12-01 18:49:05 +01:00
SkyZeroZx 2d854e01bc docs(docs-infra): Improves symbol linking for Angular Aria selectors
Improves the symbol linking logic to handle Angular component selectors (e.g., ngCombobox). It attempts to convert Angular selector patterns to their corresponding class names, improving navigation to Angular API documentation.
2025-12-01 18:47:19 +01:00
galmi 726dfad9db docs(forms): fix links in signal forms guides and use docs-pill-row links for next steps 2025-12-01 18:46:18 +01:00
Shuaib Hasan Akib 313454bf17 fix(docs-infra): truncate long TOC items and add title tooltips
Long TOC entries now truncate with …, and a title attribute is added to display the full label on hover.

Fixes: #65727
2025-12-01 18:43:46 +01:00
Ben Hong 7ea5b66a70 docs: update aria listbox selection mode section 2025-12-01 18:41:53 +01:00
Kristiyan Kostadinov 649e2ec1d4 docs: fix up font in drag drop examples
Fixes that the CDK drag&drop examples were using a serif font.
2025-12-01 18:40:34 +01:00
aparziale f18dd5e54c docs(docs-infra): fix content projection documentation
Fixed documentation issues in content projection examples.
- Component decorator without '@'
- Self-closing tag for ng-content

Fix #65675
2025-12-01 18:38:16 +01:00
kirjs cb04cee7b2 feat(docs-infra): prevent browser save dialog in adev code editor
Add Cmd+S/Ctrl+S keyboard shortcut to the adev code editor that prevents
the annoying browser save dialog from appearing. The shortcut is a no-op
since the editor already has auto-save functionality that persists changes
after 500ms of inactivity.
2025-12-01 18:36:02 +01:00
Kristiyan Kostadinov 242d3328d8 docs: release notes for the v21.0.2 release 2025-12-01 12:52:59 +01:00
Kristiyan Kostadinov 76d097e05f docs: release notes for the v20.3.15 release 2025-12-01 12:47:59 +01:00
Kristiyan Kostadinov ee53e6ff18 docs: release notes for the v19.2.17 release 2025-12-01 12:42:03 +01:00
Alan Agius 1c6b0704fb fix(compiler): prevent XSS via SVG animation attributeName and MathML/SVG URLs
This commit implements a security fix to prevent XSS vulnerabilities where SVG animation elements (`<animate>`, `<set>`, etc.) could be used to modify the `href` or `xlink:href` attributes of other elements to `javascript:` URLs.
2025-12-01 10:26:56 +01:00
SkyZeroZx 8f3fdc3e80 docs: update code snippets in reference doocumentation 2025-11-26 16:01:14 -05:00
Matthieu Riegler c1dfd9cde6 refactor(migrations): don't migration the server bootstrapApplicaiton on zoneless apps.
With the change we specifically analyse `boostrapApplication` with a config that uses `mergeApplicationConfig`.

fixes #65408
2025-11-26 15:58:53 -05:00
Angular Robot 42e73ff9ce build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-26 15:50:56 -05:00
aparziale a3fb41e797 docs(docs-infra): fix form custom control example uses syntax
Fixed form custom control example uses non-working syntax in template

Fix #65647
2025-11-26 15:48:17 -05:00
Matthieu Riegler 1c3868198e docs(docs-infra): fix visible lines/regions
fixes #65552
2025-11-26 13:43:37 -05:00
Doug Parker 8555652460 release: bump Angular DevTools version to 1.6.1 2025-11-26 13:32:10 -05:00
Matthieu Riegler a0930e166c refactor(devtools): Use the same error message as the signal custom formatter for signal errors
When signals throw errors on read, the devtools will show the same error message as the signal custom formatter.
We also don't log errors anymore to the console as those might be surprising to see as errors and are buggy behavior of the devtools.
2025-11-26 13:11:07 -05:00
Matthieu Riegler 5b720aa2eb refactor(core): show error message on signal error
When a signal throws an error on read. The formatter will show the error message.
2025-11-26 13:11:07 -05:00
Alan Agius 71435bd59f test: update polyfills.js size in integration test reports
More info: https://angular-team.slack.com/archives/C07DT5M6V/p1764089279113199
2025-11-26 13:08:42 -05:00
Angular Robot e681c871d3 build: update all non-major dependencies
See associated pull request for more information.
2025-11-26 13:08:42 -05:00
Leon Senft add8c41e5b test(core): test bundling of dynamic component creation and bindings
Add test coverage for bundling dynamic component creation API like
`createComponent()` and `inputBinding()`. This will be used to test that
Signal Forms related features for #64632 can be tree-shaken when unused.
2025-11-26 11:57:15 -05:00
Alan Agius 04101e69ff docs: release notes for the v19.2.16 release 2025-11-26 09:08:42 +01:00
SkyZeroZx ef034c15c1 docs(docs-infra): renders inline code snippets in docs pills
Improves the rendering of `DocsPillRow` to correctly display inline code snippets (using backticks) within the pill labels.
2025-11-25 18:30:05 -05:00
kirjs 4c0ba06532 release: cut the v21.1.0-next.0 release 2025-11-25 15:25:38 -05:00
kirjs 6aaddba3e2 docs: release notes for the v20.3.14 release 2025-11-25 15:15:52 -05:00
kirjs 6b1fb02dd7 docs: release notes for the v21.0.1 release 2025-11-25 15:06:26 -05:00
Alan Agius 40790ef980 fix(http): prevent XSRF token leakage to protocol-relative URLs
The XSRF interceptor previously failed to detect protocol-relative URLs (starting with `//`) as absolute URLs. This allowed requests to such URLs to include the XSRF token, potentially leaking it to external domains.

This change updates the interceptor to correctly identify protocol-relative URLs as absolute and exclude them from receiving the XSRF token.
2025-11-25 13:47:26 -05:00
Alan Agius 400fc82c43 refactor: replace getDocument() with inject(DOCUMENT)
This replaces `getDocument()` with `inject(DOCUMENT)` across hydration and transfer state logic.
2025-11-25 13:04:58 -05:00
Kristiyan Kostadinov c994267f17 refactor: add mark for signal forms
Adds a mark for signal forms so we can track adoption. Also moves the call for `@let` into `declareLet` since we don't need it to fire as often as in `storeLet`.
2025-11-25 13:03:43 -05:00
Alan Agius 3b1fa8235b fix(core): use injected DOCUMENT for CSP_NONCE
This ensures that the right document is used and that `CSP_NONCE` can be used in `provideAppInitializer` and `provideEnvironmentInitializer`.

Closes #65624
2025-11-25 11:39:20 -05:00
AntonChesnokov 5bfa027d41 fix(compiler-cli): escape angular control flow in jsdoc
Escape @-prefixed template control flow constructs during doc extraction so JSDoc parsing keeps description text intact. Add regression coverage for @for snippets.
2025-11-25 11:33:25 -05:00
Angelo Parziale 346caefa8d docs(docs-infra): Fix anchor link DI
Fix anchor link for Dependency Injection Overview.
2025-11-25 11:05:42 -05:00
kirjs dec222d4d7 refactor(forms): Make reset take value
Now you can do form.reset({name: 'cat', age: 4});
2025-11-25 10:51:35 -05:00
Miles Malerba c70e246c23 feat(forms): add DI option for classes on Field directive
Adds a DI configuration option for signal forms that allows the
developer to specify CSS classes that should be automatically added
by the `Field` directive based on the field's status.
2025-11-25 10:33:38 -05:00
Angular Robot 076984259d build: lock file maintenance
See associated pull request for more information.
2025-11-25 10:30:45 -05:00
SkyZeroZx 67d41e9bcc docs: improve core package API documentation with additional reference links 2025-11-25 10:19:36 -05:00
Cheng-Hsuan Tsai 56e059948f docs: replace aria grid overview example 2025-11-25 10:16:57 -05:00
Leon Senft 3a1eb07c46 fix(forms): allow dynamic type bindings on signal form controls
The type checker will no longer prohibit binding the Signal Forms `[field]`
directive to an input with a dynamic `[attr.type]` or `[type]` binding.
2025-11-25 09:15:58 -05:00
Oyama Michinoku 2102bfe5aa docs: fix typo by correcting W3 to W3C 2025-11-25 09:14:00 -05:00
Hussein Mahmoud Kandil a294e3b94d docs: fix example imports and missing event URL reference
The analytics tracking example contained unused and missing imports,
and it incorrectly referenced the page's URL.
This update fixes the imports and ensures the handler uses `event.url`,
allowing the example to work correctly.
2025-11-25 07:44:06 -05:00
Andrew Scott 51ebe9a4fc refactor(core): Remove toggles used for zoneless by default migration
this migration is complete both internally and externally
2025-11-24 16:57:49 -05:00
Kristiyan Kostadinov ca6ab6c914 fix(core): debug data causing memory leak for root effects
We track all effects that are created for debugging purposes in the `resolverToEffects` map. This ends up leaking memory for effects registered on long-living resolvers (e.g. on the root injector), because they stay in the array, even if the effect itself has been destroyed.

These changes add a callback to clean up the references.

Fixes #65265.
2025-11-24 15:26:09 -05:00
Leon Senft f97a1d4856 refactor(forms): support custom control directives
Support binding `[field]` to directives that implement
`FormValueControl` or `FormCheckboxControl`.

The `[field]` binds to whichever directive (or component) matches first in the
event there are multiple implementations. We are considering whether to make
this an error state, which could be reported during type checking.

Closes #63910, Closes #64992
2025-11-24 13:48:17 -05:00
Ben Hong d442c72f87 docs: standardize aria code examples to not use component suffix 2025-11-24 13:28:33 -05:00
Matthieu Riegler b34e48bdff docs: add callout on zone base testing helpers
With zoneless being the default, we need to make these requirements more explicit.

fixes #65539
2025-11-24 13:27:46 -05:00
Joey Perrott 046501fd33 refactor(docs-infra): make docs-alert an inline token
Migrate docs-alert to be inline instead of block, this ensures that the content is placed within a <p> tag as expected. This is important
for ensuring that the iconography is placed correctly within the wrapper div generated for the alert. Additionally, we refactor the matcher
code to be more efficient, running with fewer loops.
2025-11-24 13:25:59 -05:00
Matthieu Riegler 98ceb0a80d ci: update pullapprove reviewers
Removing Minko from the pool of automatically picked reviewers
2025-11-24 13:25:26 -05:00
SkyZeroZx 2ac826867b docs: Update router docs to add references and components input fixed syntaxis 2025-11-24 13:18:28 -05:00
Alessio Pelliccione 7d20f2071c docs(docs-infra): fix missing syntax highlighting
closed angular#65565
2025-11-24 13:13:22 -05:00
Shuaib Hasan Akib 93cff501e9 refactor(common): remove redundant standalone: true as it is default now
-removing `standalone: true` from integration
- removed whitespace
2025-11-24 13:12:15 -05:00
Kristiyan Kostadinov 6b8720de91 fix(compiler-cli): do not type check native controls with ControlValueAccessor
Currently when we detect a `field` binding on a native element, we treat it as a built-in native control. This might not be the case if it's a pre-existing `ControlValueAccessor` relying on the CVA interop.

These changes try to detect any CVA-like directive on the element and disable the additional type checking if there are any.

Fixes #65468.
2025-11-24 13:08:42 -05:00
Kristiyan Kostadinov 5cfdd7897b refactor(compiler-cli): track public methods during analysis
Updates the directive analysis to track the public methods of the class.
2025-11-24 13:08:42 -05:00
Tomer953 a4f50bdd54 fix(migrations): detect structural ngTemplateOutlet and ngComponentOutlet
the common-to-standalone migration only matched [ngTemplateOutlet] and
[ngComponentOutlet] bindings and missed their structural forms
(*ngTemplateOutlet and *ngComponentOutlet). This caused missing imports
when removing CommonModule. This change adds structural directive
patterns so the migration correctly identifies needed imports.
2025-11-24 12:40:57 -05:00
Shuaib Hasan Akib b26fe73a91 docs(docs-infra): keep 'Show code' button aligned right and prevent metadata wrapping
Ensures the example viewer header displays correctly by keeping the "Show code"
button aligned to the right and preventing metadata text from wrapping.
Improves layout consistency across documentation examples.
2025-11-24 12:23:36 -05:00
Matthieu Riegler 9dd7cc13ca ci: adding myself as optional to the compiler scope
For whenever I feel confortable approving compiler PRs like diagnostics
2025-11-24 12:18:26 -05:00
Alan Agius c843a46912 build: update release script to support changelog cherry-picking
This commit updates the release script to support cherry-picking changelog updates to the main branch when releasing from a patch branch. It also introduces a marker in the changelog to separate releases and ensures the GitHub release uses the formatted changelog from disk.
2025-11-24 12:17:20 -05:00
hawkgs 0f4b11c293 refactor(compiler-cli): add a resource debugName transform (#64172)
Add a TS transform for `resource` (and `httpResource`) `debugName`. Test the transformations.

PR Close #64172
2025-11-24 11:30:12 -05:00
hawkgs 3ae452e64f refactor(core): add debug name to resource (#64172)
Decorate `resource` (and `httpResource`) with `debugName`, along with all of its internal signals.

PR Close #64172
2025-11-24 11:30:12 -05:00
Matthieu Riegler b5ae62c02b docs: update devtools guide
- splits the injector inspector into its own guide
- update the screenshots
- add defer block section
- add hydration section
2025-11-24 11:11:26 -05:00
NicoPolazzi 325ab18084 docs: correct signals tutorial inconsistencies in chapters 6-10 2025-11-24 11:08:27 -05:00
Shuaib Hasan Akib 0203dad09b docs: html examples and replace <docs-code> with fenced code blocks
Replaced <docs-code language="html" with fenced html for improved readability and consistency across documentation.
2025-11-24 10:38:32 -05:00
Matthieu Riegler 119c6ddaeb docs(docs-infra): simplify tab selection
Tab selection relied on the tabs being visible whe nthe example is loaded. That didn't work when `hideCode` was used.

fixes #65550
2025-11-24 10:24:39 -05:00
HyperLife1119 b6b6fae483 docs: fix order of render phases in lifecycle documentation 2025-11-24 10:22:28 -05:00
Shuaib Hasan Akib 8f89507a0b docs: fix internal links showing as external
Replace absolute URLs (https://angular.dev/...) with relative URLs
(/...) to prevent internal documentation links from being treated
as external links and opening in new tabs.
2025-11-24 10:21:38 -05:00
Kristiyan Kostadinov 26e2092dd1 test: remove unnecessary test calls
Removes calls to `TestBed.configureTestingModule` since they aren't necessary.
2025-11-24 10:18:18 -05:00
Shuaib Hasan Akib 16a0b7dfdb fix(docs-infra): update deprecated API link to use correct status value
Replaced `status=deprecated` with the correct numeric value `status=8`
to ensure the Deprecated APIs link resolves properly in the docs.
2025-11-24 10:17:32 -05:00
Yahya-Almubarak e501b7e445 docs: fix typo in tutorial 2025-11-24 10:15:01 -05:00
Alan Agius f7f9707508 build: run e2e in sandbox
Updates the E2E test configuration to run within the Bazel sandbox.
2025-11-24 10:03:00 -05:00
Angular Robot 5961e96196 build: update all github actions
See associated pull request for more information.
2025-11-24 09:35:45 -05:00
Angular Robot 50259f02f3 build: update pnpm to v10.23.0
See associated pull request for more information.
2025-11-24 09:35:06 -05:00
Alan Agius b28570b227 docs: update ng serve builder to @angular/build:dev-server and detail proxy path matching behavior.
Closes #53652
2025-11-24 09:33:24 -05:00
Matthieu Riegler 48a05dd38c docs: fix v21 event header image
fixes #65572
2025-11-24 09:08:19 -05:00
Hussein Mahmoud Kandil 72b1f7fd43 docs: fix router event subscription in error handler example
The example incorrectly persisted the error message after a successful
navigation retry because the stream only emitted NavigationError events.
This update removes the filter and returns an empty string for non-error
events, allowing the signal to clear the message on normal navigation.
2025-11-22 09:10:54 -05:00
SkyZeroZx 38a354ffa2 docs: Adds signal type checking documentation 2025-11-21 16:31:13 -05:00
Matthieu Riegler b6fee3f107 fix(core): apply bootstrap-options migration to platformBrowserDynamic
The migration wasn't applied to projects relying on `platformBrowserDynamic()` prior to this fix.
2025-11-21 16:28:20 -05:00
Shuaib Hasan Akib f884c181b3 docs: format JSON examples and replace <docs-code> with fenced code blocks
Replaced <docs-code language="json" for improved
readability and consistency across documentation.
2025-11-21 16:23:52 -05:00
Shuaib Hasan Akib 68aa83e8cf docs: format JSON examples and replace <docs-code> with fenced code blocks
Replaced <docs-code language="json" header=".postcssrc.json"> with fenced
JSON code blocks using ```json {header: '.postcssrc.json'} for improved
readability and consistency across documentation.
2025-11-21 15:48:42 -05:00
Matthieu Riegler 67d3c2529f refactor(devtools): don't query defer nodes
This prevents from throwing errors when selecting defer nodes
2025-11-21 15:42:54 -05:00
cexbrayat 88546ab127 docs: consistent casing for onpush zoneless migration MCP tool name
The tool has been renamed in the CLI for consistency https://github.com/angular/angular-cli/pull/31866
2025-11-21 13:25:59 -05:00
SkyZeroZx 46269be842 feat(docs-infra): add docs-image extension for enhanced image handling in markdown
Extends the Markdown parser to support `loading`, `decoding`, and `fetchpriority` attributes for images via curly brace syntax.
2025-11-21 13:24:59 -05:00
Shuaib Hasan Akib 6f1329f34a docs: format example code blocks for consistency and readability 2025-11-21 13:24:23 -05:00
Joey Perrott f61e61ac4f refactor(docs-infra): remove the multiple code example view modes
Rather than using multiple view modes for code examples, we can just treat the previous snippet mode as
as multifile mode that just only has one file in it.
2025-11-21 13:22:00 -05:00
Joey Perrott 88753d6a5a refactor(docs-infra): improve code efficiency for adding line numbers
Only run the code for adding line numbers if line numbers are required, otherwise skip the code block
2025-11-21 13:20:46 -05:00
Joey Perrott a873c4eb1a refactor(docs-infra): remove the unnecessary whitespace using shiki
Use a transformer within shiki to remove the unnecessary whitespace between code lines
2025-11-21 13:20:46 -05:00
Joey Perrott 8ec0a4ee5c refactor(docs-infra): drop support for providing a file diff in docs-code
Drop support for exposing a diff view in the docs-code element as it is unused and costly to even check for
2025-11-21 13:20:46 -05:00
Joey Perrott fee79e37d5 refactor(docs-infra): use shiki for highlighting
Use shiki to perform highlighting instead of a postprocessing action
2025-11-21 13:20:46 -05:00
Joey Perrott a8f46e598a fix(docs-infra): link to the snippet location at the proper commit for examples
Within examples, we now link to the github URL using the commit that was made to create adev, rather than
always on main, which may change over time.
2025-11-21 13:19:53 -05:00
Shuaib Hasan Akib 9565938534 docs: format example code blocks for consistency and readability and keep only file name in header 2025-11-21 13:17:17 -05:00
Shuaib Hasan Akib 34fa11ec9d docs: clarify strictInputAccessModifiers applies to both input types
Update the strictInputAccessModifiers documentation to clarify that:
- The flag applies to both @Input() decorator and input() signal-based inputs
- The checking only applies to inputs, not outputs
- format interface with fenced block

Fixes docs part of #65243
2025-11-21 13:16:08 -05:00
SkyZeroZx 1672493d1a docs(docs-infra): update syntax highlighting for inline templates in decorators
Updates syntax highlighting rules to properly handle inline templates defined within decorators, improving readability and consistency in code examples
2025-11-21 13:14:53 -05:00
Shuaib Hasan Akib aafc8e75a1 docs: Indented the <docs-code> blocks inside numbered list items to ensure correct Markdown rendering and prevent the steps from breaking visually.
- Remove path from header
2025-11-21 13:14:10 -05:00
Angular Robot 364ea11e9d build: update bazel dependencies
See associated pull request for more information.
2025-11-21 13:12:04 -05:00
Ben Hong 8f346ad070 docs: move aria tabs into content organization category 2025-11-21 12:25:36 -05:00
voi99 5685e3879c docs(forms): update error class to error-list in signal forms example 2025-11-21 12:23:49 -05:00
Shuaib Hasan Akib f825547353 docs: remove unnecessary standalone: true from examples
Standalone components are now the default, so explicitly specifying
`standalone: true` is no longer required. Updated relevant documentation
examples to avoid redundant configuration and keep the guides concise.
2025-11-21 12:23:27 -05:00
Angular Robot 200c9d94ff build: update all github actions to v6
See associated pull request for more information.
2025-11-21 12:23:04 -05:00
Alan Agius 74405c7e7a build: automate GitHub release creation for vscode extension
Update the release script to automatically create a GitHub release and upload the VSIX asset.

Example release: https://github.com/angular/angular/releases/tag/vsix-21.0.0
2025-11-21 12:22:20 -05:00
Syam Gadde 1628125bcb fix(compiler-cli): ignore non-existent files
Ignore files that fail fs.exists() rather than throw ENOENT.  Some applications deliberately create "broken" symbolic links that are not relevant to compilation (e.g. emacs lock files that link to owner "user@host").
2025-11-21 11:38:57 -05:00
Shuaib Hasan Akib 68f5ceeb46 docs: fix incorrect Signal Forms link
Updated outdated link guide/forms/signal-forms/ to the correct path guide/forms/signals/ to ensure proper navigation.

Fixes: #65461 #65462
2025-11-21 10:55:52 -05:00
Ben Hong b7d91a796b docs: iterate on signal forms essentials guide 2025-11-21 10:48:01 -05:00
Shuaib Hasan Akib cea19803d8 docs: add missing ARIA patterns and API reference
Adds the missing ARIA usage patterns and links to the relevant API reference
sections to improve accessibility guidance and ensure examples follow recommended
best practices.
2025-11-21 10:18:36 -05:00
Alessio Pelliccione 2ddf26e699 refactor(docs-infra): automate algolia index name based on package version
Previously, the Algolia index name was hardcoded in the configuration, requiring manual updates for every new major release branch.

This commit automates the index name selection by deriving the version directly @angular/core. It dynamically assigns:
- `angular_next_dev` for pre-releases (`-next`, `-rc`) and local snapshots (`0.0.0`).
- `angular_vXX` (e.g., `angular_v19`) for stable releases.
2025-11-20 19:21:32 -05:00
SkyZeroZx 889afe9aa2 docs: updates code block language tags in signal forms 2025-11-20 19:20:30 -05:00
Raxabi ee57b0f2fa docs: Fix missing single quote in the first navigateByUrl example. 2025-11-20 19:19:43 -05:00
marktechson c4722820e7 docs: fix update guide typo
The update from 20 to 21 featured the wrong number, this fixes that
2025-11-20 19:19:17 -05:00
Andrew Scott 1ab461c846 refactor(router): Store route injector on ActivatedRoute instance
This eliminates the need to pass around the EnvironmentInjector
everywhere we need the injection context for a route.
2025-11-20 17:05:10 -05:00
Andrew Scott c25d749d85 feat(router): Execute RunGuardsAndResolvers function in injection context
Allows more sophisticated checks based on information available in DI
(e.g. the router state). Use-cases have been described in #53944 / https://github.com/angular/angular/issues/31843#issuecomment-1890955590

resolves #53944
2025-11-20 17:05:10 -05:00
Alan Agius 1a094ddb2b ci: try to resolve vscode extension e2e flakes
Update e2e test runner to VS Code 1.102.0, streamline test activation, and manage temporary directories via `TEST_TMPDIR`.
2025-11-20 17:03:15 -05:00
Doug Parker 2ecdb221d3 docs: correct v21 LTS end date and v20 active end date
Updated to align the v20 active end date with the v21 release date and fix the v21 LTS to be 1-year after the active period ends.
2025-11-20 16:47:27 -05:00
Johannes Hoppe 11da7a65c0 docs(core): remove outdated regex template restriction in best-practices.md
Regular expressions in templates are now supported as of Angular 21.
2025-11-20 16:42:52 -05:00
Charles Lyding 396c25ef5a docs: prioritize ng add for Tailwind CSS and clarify manual steps
This commit updates the Tailwind CSS integration guide (`adev/src/content/guide/tailwind.md`) to introduce `ng add tailwindcss` as the primary, automated method for integrating Tailwind CSS.
2025-11-20 15:00:24 -05:00
Angular Robot 5ddeafced7 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-20 14:27:51 -05:00
Devin Chasanoff b8fa9cc7d5 docs: add v21 event game 2025-11-20 13:27:46 -05:00
Ben Hong be6f2f066f docs: consolidate patterns and iterate on conclusion for angular aria overview 2025-11-20 12:38:19 -05:00
JoostK 913cde8ab4 refactor(core): let the profiler handle asymmetric events leniently
Although the prior commit has made more profiler events guaranteed symmetric
through the use of finally-blocks, there continue to be some situations
that could potentially result in asymmetric events, e.g. application
bootstrap doesn't guarantee symmetric events. This commit makes the profiler
lenient to these situations by unrolling the stack past the asymmetric event
data, eventually reaching the expected start event.
2025-11-20 12:29:59 -05:00
JoostK 3760045e3e fix(core): notify profiler events in case of errors
Profiler events are expected to be symmetric, yet in the case of errors this symmetry may break
if events aren't always kept in sync with their corresponding start event. This commit moves
various end events to be run from a finally-block, allowing them to notify the profiler even
when an error has occurred.

Fixes #62947
2025-11-20 12:29:59 -05:00
kirjs bea7358225 docs: remove unnecessary @ts-ignore from signal forms playground
The @ts-ignore comment is no longer needed as the module resolution
issue has been fixed in the playground editor configuration.
2025-11-20 12:26:21 -05:00
marktechson 183d194025 docs: add 20 to 21 update guide 2025-11-20 11:46:46 -05:00
Wagner Maciel 29185a864f docs: fix standlone menu overlay 2025-11-20 11:20:37 -05:00
David Kingma 0812ac3bec refactor(core): add debugName option to rxjs-interop toSignal
toSignal predates the debugName option for signals to name the signals in the Angular dev-tools This adds the debugName option to toSignal.
2025-11-20 10:49:50 -05:00
Charles Lyding 80202bffee docs: add note about Karma/Jasmine examples in testing services guide
This guide currently contains Karma/Jasmine specific code examples.
Adding a note to inform readers that Vitest equivalents are being worked on.
2025-11-20 10:47:34 -05:00
Alessio Pelliccione 42c05650ff fix(docs-infra): prevent icons from being translated in aria guide
This commit adds the `translate="no"` attribute to the icon elements to ensure they are preserved in their original form and not modified by translation tools.

Closes #65406
2025-11-20 10:47:12 -05:00
Ben Hong fc2e414262 docs: add signal forms custom controls guide
Co-authored-by: Leon Senft <leonsenft@users.noreply.github.com>

docs: add signal forms custom controls guide
2025-11-20 10:34:58 -05:00
marktechson 890414245f docs: adds a link to the signal forms example 2025-11-19 16:41:02 -08:00
Charles e77fb1fb14 docs: separate Zone.js-specific testing utilities into new guide
This commit moves documentation for Zone.js-dependent testing utilities
(`waitForAsync`, `fakeAsync`, `tick`, `discardPeriodicTasks`, `flushMicrotasks`)
from `testing/utility-apis.md` to a new dedicated guide:
`testing/zone-js-testing-utilities.md`.
2025-11-19 16:40:35 -08:00
tsc036 34e1fe235f refactor(core): export profile event as enum and move profile_types.ts and framework to shared devtools folder
move framework enum and profile_types to a shared folder so it can be used by wiz
2025-11-19 15:22:49 -08:00
Angular Robot 4c31f8ebf4 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-19 15:00:49 -08:00
Ben Hong 38f4ea1ea8 docs: add signal forms validation guide 2025-11-19 14:53:01 -08:00
Ben Hong 4771dc9cf7 docs: add redirect for angular overview 2025-11-19 14:52:39 -08:00
SkyZeroZx e9ba63a4c1 docs: Adds documentation for generic type argument to SimpleChanges 2025-11-19 14:31:53 -08:00
Joey Perrott 0bb09dc5ba build: update to latest ng-dev tooling for caretaker handoff update
Update to the latest tooling to upate how caretaker handoff is handled, using new standardized groupings
2025-11-19 14:30:17 -08:00
Shuaib Hasan Akib c7affdfbc9 refactor(common): update examples to align with Angular best practices
Updated examples to use the standalone component approach and the latest
2025-11-19 14:29:49 -08:00
Kristiyan Kostadinov 5e6d8573f4 perf(core): avoid repeat searches for field directive
The `getControlDirective` is called multiple times, both at init and during each update run. Under the hood it performs a linear search for the `Field` directive.

We can speed this up by finding its index once and reusing it since the array of directive matches is static.
2025-11-19 14:28:56 -08:00
Kristiyan Kostadinov 81ce1ba1d9 refactor(compiler): remove interpolation-related symbols
We removed the ability to customize the interpolation some time ago. These changes remove the remaining code related to them.
2025-11-19 14:28:20 -08:00
Kristiyan Kostadinov b6c141bf8b refactor(compiler): remove container blocks config
Removes the ability to specify container blocks when creating an i18n parser. We were only passing in `switch` and it likely won't change.
2025-11-19 14:28:20 -08:00
Miles Malerba 7ddf4a6b07 fix(forms): run reset as untracked
Run the signal forms `reset()` as untracked so it does not trigger
`effect` to rerun when the model changes

Fixes https://github.com/angular/angular/issues/65322
2025-11-19 14:27:52 -08:00
Alan Agius 22ad71d752 refactor: improve release process instructions and vsce login handling
This commit introduces several improvements to the release process:

- Adds a clear warning and instructions to test the extension before merging the release PR
- Removes the explicit `vsce login` command.
2025-11-19 14:22:46 -08:00
Cheng-Hsuan Tsai d2fe8674f1 docs: update aria overview page 2025-11-19 14:11:20 -08:00
Alessio Pelliccione 7e5fca2608 docs: add style binding example to style guide
Adds a parallel example for style bindings alongside the existing class binding example, demonstrating the preferred syntax of [style.property] and [style] over [ngStyle] directive.
2025-11-19 14:09:46 -08:00
Joey Perrott 2013261243 docs: add version 21 to update guide page 2025-11-19 14:08:07 -08:00
Georgi Serev 0a33a18fa4 docs(docs-infra): fix code editor file creation and renaming
Hide the field when the user unfocuses from it; Fill the input with the file name when renaming; Fix file path renaming
2025-11-19 14:07:30 -08:00
Ben Hong 2ead438634 docs: add signal forms field state management guide 2025-11-19 14:07:03 -08:00
Ben Hong fb32a5bafa docs: improve instruction for import in signal forms tutorial 2025-11-19 14:06:11 -08:00
Ben Hong d352484773 docs: add signal forms tutorial 2025-11-19 14:06:11 -08:00
Angular Robot ca18d8e967 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-19 14:04:38 -08:00
Devin Chasanoff c2317949a8 docs: add release blog to v21 page 2025-11-19 14:34:40 -07:00
Joey Perrott 1b4d1f88dc docs: link to v21 blog post in changelog 2025-11-19 14:34:15 -07:00
Jessica Janiuk 11ea1a01ff build: bump core zone.js version
this bumps the core dep on zone.js to 0.16.0.
2025-11-19 13:22:14 -08:00
Joey Perrott c03883ec54 build: provide a specific version of zone.js for the vscode pre standalone test
Use zone.js 0.15.0 specifically instead of moving to a later verison of zone.js for the test
2025-11-19 13:07:43 -08:00
Jessica Janiuk 58014cb01a release: cut the zone.js-0.16.0 release 2025-11-19 12:38:52 -08:00
Jessica Janiuk d42d7523ec build: bump adev version
Bump adev versions for v21 release
2025-11-19 12:09:26 -08:00
Joey Perrott 9a663a28f9 release: bump version of in memory web api 2025-11-19 12:05:51 -08:00
Jessica Janiuk 4c6b4d76a0 docs: release notes for the v21.0.0 release 2025-11-19 10:10:14 -08:00
Jessica Janiuk eb2f6653c9 docs: release notes for the v20.3.13 release 2025-11-19 09:43:03 -08:00
Joey Perrott a51ba9c7a9 docs: update the actively supported versions
Update the actively supported versions table
2025-11-19 08:47:48 -08:00
Wagner Maciel 3e31a9967e docs: fix menubar overlay bug 2025-11-19 08:45:37 -08:00
kirjs 040af1aaa1 fix(docs-infra): add moduleResolution to TypeScript compiler options for playground
This fixes signal forms, but idk if it breas other things
2025-11-19 08:26:17 -08:00
Cheng-Hsuan Tsai 1289371474 docs: aria grid replace overview example with a playful one 2025-11-19 08:18:56 -08:00
Angular Robot 56b40d835f build: update dependency @inquirer/prompts to v8
See associated pull request for more information.
2025-11-19 08:14:42 -08:00
Angular Robot 52d05f9be9 build: update all github actions
See associated pull request for more information.
2025-11-19 08:13:22 -08:00
Ben Hong d3ea7cbcc9 docs: update aria component api links 2025-11-19 08:12:51 -08:00
Angular Robot 634bfec66c build: update bazel dependencies
See associated pull request for more information.
2025-11-19 08:11:01 -08:00
Aristeidis Bampakos 0e1ddce1cb fix(docs-infra): add install in pnpm
Add missing install option in pnpm command.
2025-11-19 08:10:09 -08:00
Ben Hong 90bd469ac3 docs: iterate on signal forms essential guide 2025-11-19 08:09:04 -08:00
Ben Hong 758cd113b3 docs: remove redundant labels on aria since section is marked new 2025-11-19 08:08:26 -08:00
Andrew Scott 2cbe9425bf docs: bump VSCode extension version to 21.0.0
cherrypick notes into main (and version bump)
2025-11-19 08:05:48 -08:00
Angular Robot ce98cc7dea build: update dependency @codemirror/view to v6.38.8
See associated pull request for more information.
2025-11-19 08:04:52 -08:00
Ben Hong e0eb619c03 docs: add signal forms playground template 2025-11-19 08:03:53 -08:00
Devin Chasanoff 3810422521 docs: add v21 banner 2025-11-19 08:02:14 -08:00
Joey Perrott 35125c6116 build: force angular cli to run in non-TTY mode for adev and devapp
Force adev and devapp to run in non-TTY mode so it doesn't create a prompt that can't be interacted with. This will initially have no effect,
but the fix is expected to land in CLI to make this work as expected in the next few days.
2025-11-19 08:00:40 -08:00
Ben Hong 7a910e66d4 docs: add signal forms comparison guide 2025-11-18 17:01:39 -08:00
Matthieu Riegler c7424c8f07 docs: fix docs heading alignment 2025-11-18 17:00:24 -08:00
Ben Hong 47eb77ffb1 docs: update angular aria guides structure, subnav menu, and examples 2025-11-18 15:29:47 -08:00
Angular Robot 7e9f1cc8d8 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-18 15:28:38 -08:00
Wagner Maciel 114c83ed8b docs: aria combobox examples 2025-11-18 14:55:54 -08:00
Wagner Maciel 695f4df912 docs: aria menubar examples 2025-11-18 14:55:54 -08:00
Wagner Maciel 1963bd67cc docs: aria menu examples 2025-11-18 14:55:54 -08:00
Wagner Maciel 04859b41a2 docs: aria tabs examples 2025-11-18 14:55:54 -08:00
Wagner Maciel b2080c8fb0 docs: aria autocomplete examples 2025-11-18 14:55:54 -08:00
Andrew Seguin d4595791d6 docs: hide temporary prerender tabs and multifile docs sections 2025-11-18 14:54:48 -08:00
Amy Sorto 111a7644ef docs: update overview page 2025-11-18 14:54:08 -08:00
Shuaib Hasan Akib 27fa993fb8 docs: format examples with replacing <docs-code> typescript examples with fenced ts code blocks
Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8102.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>
2025-11-18 14:11:23 -08:00
Cheng-Hsuan Tsai 24814ce43e docs: add aria tree examples and disable text selection 2025-11-18 14:10:34 -08:00
Angular Robot ceb2d7166b build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-18 11:19:53 -08:00
Cheng-Hsuan Tsai d0877a524a docs: add aria grid examples 2025-11-18 11:14:53 -08:00
Cheng-Hsuan Tsai c639f84347 docs: add aria accordion examples 2025-11-18 11:14:27 -08:00
Cheng-Hsuan Tsai 41e9c7b4bf docs: add aria tree examples 2025-11-18 11:13:52 -08:00
Nicolò Polazzi 661a554b8d docs: correct inconsistencies in signals tutorial 2025-11-18 11:11:26 -08:00
SkyZeroZx ed0647d2e6 refactor(devtools): add matcher and runGuardsAndResolvers support in router viewer
Enhance the Angular DevTools router viewer to display routes that use custom `matcher` functions and reflect the `runGuardsAndResolvers` configuration
2025-11-18 08:29:41 -08:00
Angular Robot f799fc89f4 build: lock file maintenance
See associated pull request for more information.
2025-11-18 08:17:39 -08:00
Shuaib Hasan Akib 374c36d810 docs: simplify docs-code header by removing paths and keeping only file name and info 2025-11-18 08:15:41 -08:00
Shuaib Hasan Akib 0182939d5e docs: replace legacy <docs-code> with fenced code blocks with highlight metadata
Replaced older <docs-code> components (e.g.
<docs-code language="ts" highlight="3">…</docs-code>)
with modern fenced code blocks using {highlight:[3]} metadata
2025-11-18 08:15:02 -08:00
Devin Chasanoff 631035a2e0 docs: add AI tutor instructions 2025-11-18 08:14:33 -08:00
Angular Robot 6178e3ebfb build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-17 16:34:41 -08:00
Angular Robot 8187833d1b build: update cross-repo angular dependencies to v21.0.0-rc.3
See associated pull request for more information.
2025-11-17 15:18:27 -08:00
SkyZeroZx c93d02151a docs: replace @HostListener with host event bindings in attribute directives 2025-11-17 15:09:11 -08:00
ljasek 6d35ab8c28 docs: fix JetBrains AI Assistant MCP JSON configuration 2025-11-17 15:08:15 -08:00
hawkgs e7a6e31a70 fix(devtools): refine when signal graph button is shown
Show the signal graph button only when a signal-graph-eligible node from the directive explorer is selected; Fix client app error when a `defer` node is selected (related)
2025-11-17 14:45:01 -08:00
aparziale c757fd6c29 docs(docs-infra): add advanced recommendations
Added recommendation in advanced section for redirectTo and canMatch will generate an error. These properties are incompatible together

fixes #65267
2025-11-17 14:40:08 -08:00
Paul Leflon f13159f811 docs: fix markdown table in custom elements guide 2025-11-17 14:33:32 -08:00
Angelo Parziale 7a2d5116f2 refactor: convert docs-code blocks to inline TypeScript documentation
This PR converts the custom <docs-code> blocks to standard Markdown code blocks with TypeScript syntax highlighting.
2025-11-17 14:33:00 -08:00
Jessica Janiuk cbd77b9db8 docs: release notes for the v21.0.0-rc.3 release 2025-11-17 13:40:42 -08:00
Angular Robot 3661ae199c build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-17 11:46:57 -08:00
Cheng-Hsuan Tsai d104acb286 docs(docs-infra): fix broken code tabs
When `<mat-tab-group>` is conditionally removed by `@if` it loses the
`<mat-tab>` projected content somehow.
2025-11-17 11:45:19 -08:00
Joey Perrott 7e70682f2b docs: update examples to latest Angular
Updates the adev examples to use Angular 21.0.0-rc.2
2025-11-17 11:17:58 -08:00
Joey Perrott 25546f6152 Revert "ci: remove cache usage from pr.yml"
This reverts commit 3760feb5ec.
2025-11-17 11:08:54 -08:00
Joey Perrott cf07486532 ci: remove cache usage from ci.yml
Remove the @actions/cache usages from ci.yml
2025-11-17 11:08:54 -08:00
Angular Robot a6968ed0ca build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-17 10:58:10 -08:00
Angular Robot e1c26a2e72 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-17 10:57:19 -08:00
Wagner Maciel cb481a549b docs: aria listbox examples (#65273)
PR Close #65273
2025-11-17 18:39:00 +00:00
Wagner Maciel 047b2659b1 docs: multiselect examples (#65273)
PR Close #65273
2025-11-17 18:39:00 +00:00
Wagner Maciel e709d1fd46 docs: aria select skins (#65273)
docs: select examples

PR Close #65273
2025-11-17 18:38:59 +00:00
Wagner Maciel ed686a0f4d docs: aria toolbar examples (#65273)
docs: aria toolbar retro example

docs: aria toolbar material example

docs: organize aria toolbar examples

docs: vertical examples

docs: final aria toolbar examples

docs: wip aria toolbar docs

PR Close #65273
2025-11-17 18:38:59 +00:00
Ben Hong 9b87689558 docs: add aria menubar component guide 2025-11-17 10:38:25 -08:00
Jessica Janiuk b2171c6c14 Revert "docs: replace legacy <docs-code> with fenced code blocks with highlight metadata"
This reverts commit c5c1689348.
2025-11-17 10:36:55 -08:00
Jessica Janiuk 88dfd96ec9 Revert "refactor(core): let the profiler handle asymmetric events leniently"
This reverts commit da9911f2b4.
2025-11-17 10:10:36 -08:00
Jessica Janiuk adc2a57be0 Revert "fix(core): notify profiler events in case of errors"
This reverts commit af1ba52587.
2025-11-17 10:10:36 -08:00
Matthew Beck 9e7ddcaa10 fix(compiler): don't choke on unbalanced parens in declaration block
Following https://github.com/angular/angular/pull/64509 we started
choking on unbalanced closing parentheses in declaration blocks,
specifically in quoted background-image urls. This was reported in
https://github.com/angular/angular/issues/65137.

This occured because we previously (and now again) traverse the entire
declaration block when selecting for :host-context() selectors to shim.
This is an oddity of how we parse styles today, and is likely something
we'd want to remove if we parsed selectors properly.

This change adds a new flag to _splitOnTopLevelCommas which allows it to
continue past unbalanced closing parentheses in the declaration block,
returning _convertColonHostContext to its previous behavior while
keeping support for the extra nesting in :host-context().
2025-11-17 09:46:01 -08:00
Matthieu Riegler c15836c8c7 refactor(core): promote the custom track profiler to stable.
We didn't get much report on the feature itself so we feel confident about promoting it to stable. In parallel we'll also land #62959 but one is not blocking the other.

fixes #64996
2025-11-17 09:42:32 -08:00
Matthieu Riegler b41a94bc85 fix(forms): Set error message of a schema error.
Use the error message of the issue as the error message of the error itself.

fixes #65247
2025-11-17 09:41:54 -08:00
Miles Malerba f47637426f refactor(forms): avoid console warnings when setting NaN
It can be useful for a developer to set `NaN` as the value for a number
input, as a way to say "clear the input". However, directly setting this
value to the `.valueAsNumber` causes a console warning. This PR fixes
the console warning by just doing `.value = ''` when we would otherwise
to `.valueAsNumber = NaN`
2025-11-17 09:41:29 -08:00
Leon Senft c727df5d38 refactor(forms): reduce boilerplate needed to define custom controls
An early piece of feedback received regarding custom controls hosted on
native inputs was that they required a lot of boilerplate to bind
`FieldState` properties. Each property required an input to accept the
property, and a host binding to forward it to the native control.
2025-11-17 09:40:58 -08:00
JoostK da9911f2b4 refactor(core): let the profiler handle asymmetric events leniently
Although the prior commit has made more profiler events guaranteed symmetric
through the use of finally-blocks, there continue to be some situations
that could potentially result in asymmetric events, e.g. application
bootstrap doesn't guarantee symmetric events. This commit makes the profiler
lenient to these situations by unrolling the stack past the asymmetric event
data, eventually reaching the expected start event.
2025-11-17 09:40:04 -08:00
JoostK af1ba52587 fix(core): notify profiler events in case of errors
Profiler events are expected to be symmetric, yet in the case of errors this symmetry may break
if events aren't always kept in sync with their corresponding start event. This commit moves
various end events to be run from a finally-block, allowing them to notify the profiler even
when an error has occurred.

Fixes #62947
2025-11-17 09:40:04 -08:00
Joey Perrott 3760feb5ec ci: remove cache usage from pr.yml
Remove the @actions/cache usages from pr.yml
2025-11-17 09:29:49 -08:00
Cheng-Hsuan Tsai 4dc226231c docs(docs-infra): aria attribute typo 2025-11-17 09:29:26 -08:00
Cheng-Hsuan Tsai 35d8654a02 docs: add aria grid basic examples: pill list, calendar, and table 2025-11-17 09:29:03 -08:00
Shuaib Hasan Akib dff9d12bc3 docs: replace <docs-code> shell examples with fenced shell code blocks
Updated shell command examples to use fenced code blocks (```shell) instead of <docs-code> components, improving formatting consistency and aligning with current documentation standards.
2025-11-17 09:28:40 -08:00
Cheng-Hsuan Tsai 138e65356b docs(docs-infra): set max-height to code example 2025-11-17 09:28:14 -08:00
SkyZeroZx 0432e76171 docs: Adds links to relevant guides for APIs in core package 2025-11-17 08:47:35 -08:00
SkyZeroZx d70310896c docs: add documentation for HostAttributeToken 2025-11-17 08:46:59 -08:00
SkyZeroZx 24243e34d9 refactor(common): removes unused NgModuleFactory config in NgComponentOutlet
Removes the `ngComponentOutletNgModuleFactory`  in `_needToReCreateNgModuleInstance`
2025-11-17 08:46:08 -08:00
Alessio Pelliccione 1aed9408a4 fix(devtools): ensure external docs link opens correctly from extension popup
Adds target="_blank" and rel="noopener noreferrer" to prevent tab-nabbing and follow modern security best practices.
2025-11-17 08:45:34 -08:00
Shuaib Hasan Akib c5c1689348 docs: replace legacy <docs-code> with fenced code blocks with highlight metadata
Replaced older <docs-code> components (e.g.
<docs-code language="ts" highlight="3">…</docs-code>)
with modern fenced code blocks using {highlight:[3]} metadata
2025-11-17 08:43:37 -08:00
Alessio Pelliccione bc03c45b60 docs(docs-infra): update ARIA binding guidance and remove outdated attr. prefix requirement 2025-11-17 08:43:00 -08:00
Shuaib Hasan Akib 7ea60052f0 docs: replace <docs-code> bash examples with fenced bash code blocks
Updated bash command examples to use fenced code blocks (```bash) instead of <docs-code> components, improving formatting consistency and aligning with current documentation standards.
2025-11-17 08:42:22 -08:00
Shuaib Hasan Akib f87e9a02b5 refactor(devtools): clean up unused code and modernize component patterns
- Removed unused code and imports
- Migrated to signal-based input() APIs
- Added readonly to Angular-initialized inputs and removed explicit type annotations
- Updated templates to use self-closing tags for consistency
2025-11-17 08:40:15 -08:00
hawkgs 68d823a241 fix(devtools): show profiler exec details only if there are directives
Show the execution details of a captured frame entry only if there are recorded directives.
2025-11-17 08:39:36 -08:00
hawkgs d6be289603 fix(devtools): don't round decimal vals previews in the state serializer
The actual numerical data can only be checked in the prop edit mode. This fixes that and makes the real value visible all the time.
2025-11-17 08:39:10 -08:00
Alessio Pelliccione 7d41716703 fix(devtools): forward Angular detection to background
Ensure the content script forwards Angular detection results to the service worker so the popup/icon reflects the page state.
2025-11-17 08:38:19 -08:00
hawkgs 6fdb12357f refactor(devtools): increase font weight in the demo app
Increase the global font weight to `500`.
2025-11-17 08:37:55 -08:00
Leon Senft b1037ec2f0 fix(forms): debounce updates from interop controls
* Apply any debounce rules to updates from interop controls (if configured).
* Add tests to ensure debouncing works for all control types (native, custom,
  and interop).
2025-11-17 08:37:26 -08:00
Shuaib Hasan Akib 576f9ba889 docs: replace <docs-code> shell examples with fenced shell code blocks
Updated shell command examples to use fenced code blocks (```shell) instead of components, improving formatting consistency and aligning with current documentation standards.
2025-11-17 08:35:17 -08:00
Shuaib Hasan Akib ee5947db38 docs: improve accessibility with descriptive link and main landmark
- Replaced <a><button></button></a> with a proper <a> containing text and
  aria-label to ensure links have discernible text.

- Added main tag in home page to provide
  a consistent main landmark, improving accessibility for screen readers
  and satisfying WCAG and Lighthouse requirements.

Fixes #65181.
2025-11-17 08:32:00 -08:00
Shuaib Hasan Akib f462684211 fix(docs-infra): add bash language support for shell prompt rendering
Code blocks with `bash` language identifier were not rendering the `$`
prefix, while `shell` blocks did.

This ensures consistent command-line prompt rendering across both
`bash` and `shell` code blocks in the documentation.
2025-11-17 08:31:26 -08:00
Shuaib Hasan Akib 073dcd7ffd docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.
"src/app/open-close.component.ts" → "open-close.component.ts")
to keep examples concise and avoid unnecessary path noise.

Aligns with prior cleanup patterns (similar to angular#65016).
2025-11-17 08:30:29 -08:00
SkyZeroZx 846d50ab23 docs: add documentation for DOCUMENT injection token usage in SSR 2025-11-17 08:28:00 -08:00
Angelo Parziale a458a83133 docs(docs-infra): add npm link documentation for library development
Add comprehensive guide for using npm link with Angular libraries, including required angular.json.
2025-11-17 08:25:57 -08:00
Aristeidis Bampakos 73295b1087 docs: use the new format for the X account 2025-11-17 08:22:19 -08:00
Angular Robot f7d06ef859 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-17 08:21:02 -08:00
Charles Lyding 599b72ec5a docs: add bun package manager and standardize order in testing guides
This commit updates the testing documentation to include `bun` as a package manager option in all relevant code examples.

Additionally, it standardizes the presentation of package manager commands by:
- Consistently using a multi-tab format (`<docs-code-multifile>`).
- Enforcing a consistent order: `npm`, `yarn`, `pnpm`, `bun`.

These changes improve the user experience by providing clear instructions for multiple package managers and ensuring consistency across the testing guides.
2025-11-17 08:11:22 -08:00
Charles Lyding f5a7719373 docs: update testing guides for Vitest and reorder navigation
This commit updates the unit testing, code coverage, and debugging guides to align with the Vitest test runner, which is now the default for new Angular CLI projects.

Key changes include:
- **Unit Testing Overview**: Revised to focus on Vitest, including details on DOM emulation (jsdom/happy-dom), browser testing setup, and custom Vitest configuration via `runnerConfig`. A prominent note links to the Karma-to-Vitest migration guide.
- **Code Coverage**: Updated to reflect Vitest-specific prerequisites (`@vitest/coverage-v8`), command-line flags, and `angular.json` configuration for coverage reporting and threshold enforcement.
- **Debugging**: Completely rewritten to provide instructions for debugging Vitest tests in both Node.js and browser environments using the `--debug` flag.
- **Navigation Reordering**: The 'Testing' section in `sub-navigation-data.ts` has been reordered to present a more logical educational flow, starting with core concepts and progressing to advanced topics and migration.
2025-11-17 08:11:22 -08:00
Ben Hong c61a195391 docs: add draft aria component guides (pt 2) 2025-11-17 08:09:10 -08:00
portneon 93d548fba4 docs(router): update navigation event example to use event.code 2025-11-17 08:08:27 -08:00
Cheng-Hsuan Tsai 48cff8c128 docs(docs-infra): make show code button more discoverable when collapsed 2025-11-17 08:07:01 -08:00
hawkgs 6bfe107404 docs(docs-infra): fix misaligned tutorials card
Fix the "Deferrable views" illustration which fixes the aligned within the `docs-card`.
2025-11-17 08:06:32 -08:00
Kristiyan Kostadinov 1ba50caefc fix(docs-infra): prevent example resets from affecting CDK
The example viewer has some `::ng-deep` styles that are used to reset global styles that leak into the live examples. It works by applying a style like `.docs-example-viewer-preview * {all: revert;}`.

The problem with this is that depending on when the first example is rendered, the styles will be lower or higher in the cascade, thus making the reset unreliable. Furthermore, it can affect structural styles from the CDK which intentionally have low specificity.

These changes move the resets into the global stylesheet to make them more predictable.
2025-11-17 08:05:12 -08:00
Angular Robot d99b7437d1 build: update all non-major dependencies
See associated pull request for more information.
2025-11-17 08:04:29 -08:00
Angular Robot 28e6648c49 build: update bazel dependencies
See associated pull request for more information.
2025-11-17 08:01:38 -08:00
Shuaib Hasan Akib b3adb6001c docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.,
"src/app/open-close.component.ts" → "open-close.component.ts")
to make code examples cleaner and more focused.
2025-11-17 08:00:20 -08:00
Charles Lyding 6208016026 docs: standardize package manager commands in guides
This commit updates the elements and tailwind guides to use the standardized `docs-code-multifile` format for package manager commands. This change introduces `yarn`, `pnpm`, and `bun` alternatives to the existing `npm` commands, providing a consistent experience for users across different package managers.
2025-11-17 07:59:49 -08:00
Angular Robot 7b8c999b05 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-17 07:57:31 -08:00
SkyZeroZx c1057c69f0 docs: add formArray clear() example clarifies array manipulation 2025-11-14 15:30:49 -08:00
Angular Robot cc0753411f build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-14 15:30:18 -08:00
Miles Malerba 722292f215 refactor(forms): improve typing on min & max (#65212)
If we're calling `min` on a path that's guaranteed to be `number` we
don't want to make the users validator function handle the `null` or
`string` cases.

This uncovered an issue in the `SchemaTreePath` type which needed to be
fixed by preventing the model type from being distributed over.

PR Close #65212
2025-11-14 21:56:58 +00:00
Miles Malerba 4f8ab4fa3c refactor(forms): allow passing number|string|null paths to min & max (#65212)
Relaxes the constraints on which paths can be used with the `min` &
`max` validation rules, since people may want to validate a
potentially-null number, or a numeric value represented as a string

PR Close #65212
2025-11-14 21:56:58 +00:00
Wagner Maciel a99e724c60 docs: aria toolbar examples 2025-11-14 13:56:13 -08:00
Angular Robot 45569b62a0 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-14 13:55:27 -08:00
Cheng-Hsuan Tsai de234def0e docs(docs-infra): enable tabs layout 2025-11-14 12:24:01 -08:00
Ben Hong 8b59653788 docs: add draft of aria component guides 2025-11-14 11:26:47 -08:00
Matthieu Riegler 1464d02327 docs(docs-infra): backport docs changes from 21.0.x
The PRs should have targeted main instead of targeting `21.0.x`  explicitly
2025-11-14 09:40:28 -08:00
Miles Malerba fc1ef79ad4 build(forms): expose signal forms compat package
Hooks up @angular/forms/signals/compat to be released and have its docs
published
2025-11-14 09:23:36 -08:00
Angular Robot 5552707a97 build: update all non-major dependencies
See associated pull request for more information.
2025-11-14 08:54:51 -08:00
Angular Robot 32c9ca5577 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-14 08:54:29 -08:00
SkyZeroZx 4126ef1e94 fix(devtools): use isLazy flag to determine disabled state for action button
Refactors the logic that disables the action button for lazy-loaded routes.
Now relies on the isLazy property from the route data instead of string comparisons on the component field.
2025-11-14 08:47:05 -08:00
cexbrayat c137f1fe91 docs: ExperimentalIsolatedShadowDom mentions 2025-11-14 08:41:13 -08:00
cexbrayat b0dd813664 docs: FormArrayDirective mentions 2025-11-14 08:40:41 -08:00
Kristiyan Kostadinov 81bd455de8 refactor(compiler-cli): split up large file
The `type_check_block.ts` file was getting quite large and difficult to navigate. These changes split up the different pieces of functionality into separate files.
2025-11-14 08:40:11 -08:00
Shuaib Hasan Akib 16c5857dd1 refactor(devtools): remove redundant standalone: true as it is default now
removing `standalone: true`
2025-11-14 08:38:34 -08:00
Leon Senft acb78eeb7a test(forms): [field] inputs on components should just pass through
Test that a component with a bound `[field]` input is not treated as a
control, and that `fieldBinding` does not include the corresponding
`Field` instance.
2025-11-14 08:37:42 -08:00
Angular Robot 415cfecf09 build: update pnpm to v10.22.0
See associated pull request for more information.
2025-11-14 08:35:14 -08:00
Angular Robot f7737a5f25 build: update dependency bazel to v7.7.1
See associated pull request for more information.
2025-11-14 08:34:49 -08:00
Angular Robot 654e17651c build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-14 08:33:20 -08:00
SkyZeroZx 9ec964334e docs: Uses the self-closing tag syntax 2025-11-14 08:32:35 -08:00
KAUSHIK REDDY AWALA 6f716e400e docs(docs-infra): update di factory provider function to use correct parameters
This PR fixes a parameter mismatch in the `apiClientFactory` function documentation example. The factory was previously passing only http and `userService` to the ``ApiClient`` constructor, but the constructor actually requires http, `baseUrl`, and `rateLimitMs` as separate parameters.

Key Changes:

Extracts baseUrl and rateLimitMs from UserService using getter methods
Updates the ApiClient instantiation to pass all three required constructor parameters
Adds a comment explaining the assumption about UserService providing these values
2025-11-14 08:32:07 -08:00
Alan Agius e840cd547d fix(docs-infra): update firebase caching regex for generated files
The regex for caching generated files in firebase.json has been updated to
include lowercase letters and underscores in the 8-character hash. This
ensures that files with names like `chunk-CrXHmw_W.js` are correctly
cached.
2025-11-14 08:29:00 -08:00
Jessica Janiuk 8989536615 docs: release notes for the v20.3.12 release 2025-11-14 08:14:27 -08:00
Cheng-Hsuan Tsai 6d8c3fc888 docs(docs-infra): hide file tabs when code example is hidden 2025-11-13 15:58:09 -08:00
Angular Robot 024c93904c docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-13 15:41:09 -08:00
Angular Robot ab0ea1a8f0 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-13 15:29:02 -08:00
Angular Robot 2430c60442 build: update cross-repo angular dependencies to v21.0.0-rc.2
See associated pull request for more information.
2025-11-13 14:06:19 -08:00
Alessio Pelliccione 25320ae1eb docs(docs-infra): improve theme picker accessibility and add animations 2025-11-13 14:05:08 -08:00
Angular Robot c6068f2d98 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-13 14:02:43 -08:00
Joey Perrott fe2cc7967e ci: use hardcoded global approvers group
Use a single hardcoded, within the pullapprove config file, group for global approvers instead of leveraging a github team as a group
2025-11-13 12:16:48 -08:00
Matthieu Riegler 1b895fece6 refactor(core): flip ngDevMode condition for formatter
In cases the `ngDevMode` flag hasn't been set, still enable the formatter. What matters is if `ngDevMode` is `false ` we tree shake that away.
2025-11-13 10:01:10 -08:00
SkyZeroZx 718eb7bb3a docs: adds guide references to router APIs
Adds `@see` tags with links to relevant guides in the router documentation.
2025-11-13 10:00:19 -08:00
Leon Senft 98ce9a7b17 refactor(forms): use AbortSignal to cancel debounced updates
Add an `AbortSignal` parameter to `Debouncer`. Implementations may
choose to accept this parameter to be informed when a debounced
operation is aborted. This may be useful for canceling pending timers or
avoiding unnecessary work.
2025-11-13 09:59:19 -08:00
Angular Robot 1a94d71ad7 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-13 09:43:45 -08:00
Matthieu Riegler f737a9dd5c docs(docs-infra): Add support for metadata on fenced code blocks
This will help us replace `docs-code` with inline code usages and prevent future indentation issues
2025-11-13 09:36:13 -08:00
Shuaib Hasan Akib 3cfd4361a5 docs: replace <docs-code> block with standard fenced code block for typescript example
Replaced the <docs-code> wrapper with a Markdown fenced code block to improve
copy/paste usability, syntax highlighting consistency, and alignment with current
documentation formatting standards.

Inspired by #65043
2025-11-13 09:34:10 -08:00
Kristiyan Kostadinov 3f80ae74ba fix(core): SSR error in signal forms
Resolves an SSR error, because we weren't checking if `MutationObserver` is available.
2025-11-13 09:12:42 -08:00
Matthieu Riegler d1ab73dd87 refactor(core): remove resource flag.
This was used to migrate G3 and is no longer necessary.
2025-11-13 09:12:16 -08:00
SkyZeroZx 373c101d02 refactor(devtools): improve route data and resolver views
Adds an enhanced route data tree view to better visualize both route resolvers and router data.
2025-11-13 09:11:53 -08:00
Shuaib Hasan Akib caaa5ec8e6 docs: replace <docs-code> block with standard fenced code block for typescript example
Replaced the <docs-code> wrapper with a Markdown fenced code block to improve
copy/paste usability, syntax highlighting consistency, and alignment with current
documentation formatting standards.

Inspired by angular#65043
2025-11-13 09:11:20 -08:00
Charles Lyding 258c295b92 docs: create Vitest migration guide
This commit introduces a new guide for migrating existing Angular projects from Karma/Jasmine to Vitest.

The guide covers:
- Manual steps for installing dependencies and updating `angular.json`.
- Handling custom `karma.conf.js` configurations.
- Removing Karma-related files and packages.
- Configuring browser mode for Vitest.
- Details on the `refactor-jasmine-vitest` schematic for automated test refactoring.

The guide also clarifies that while Vitest is the default for new projects, migration for existing projects is experimental. It emphasizes reviewing changes and provides guidance on adapting custom Karma configurations to Vitest.

Renames `experimental-unit-test.md` to `migrating-to-vitest.md` and updates `sub-navigation-data.ts` accordingly.
2025-11-13 09:10:56 -08:00
Angular Robot 57a78b72ad build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-13 09:09:30 -08:00
hawkgs 7ab1b3a32a docs(docs-infra): improve playground layout
Improve the layout and optimize the empty space; Introduce some minor improvements to the code editor
2025-11-13 09:07:53 -08:00
SkyZeroZx b6a91d4c39 docs: Fixed mermaid diagram node label contrast in dark mode 2025-11-12 15:01:35 -08:00
Kristiyan Kostadinov f7e58577a4 refactor(compiler-cli): rework type checking for signal forms
Reworks the way we approach type checking of signal forms to be closer to the behavior at runtime. There are a couple of scenarios that we handle:

1. For native controls, we now produce simplified type checking code that looks as follows:

```
var t1 = null! as number | string; // Type depends on the input `type`.
t1 = someField().value();
```

2. For custom controls we generate bindings to the individual inputs, rather than checking conformance against `FormValueControl`/`FormCheckboxControl`. This is closer to the behavior at runtime and it allows us to handle generic directives properly.
2025-11-12 13:13:48 -08:00
Kristiyan Kostadinov 14152f69b9 refactor(core): remove unused type
Removes the `ExtractFromControlValue` type since it won't be necessary anymore.
2025-11-12 13:13:48 -08:00
SkyZeroZx 4544135b1e docs: update tutorials with self-closing tags, standalone router directives, and fix syntax highlighting 2025-11-12 13:13:22 -08:00
Jan Martin 48d395402d release: bump Angular DevTools version to 1.6.0 2025-11-12 11:59:07 -08:00
Angular Robot 3b51b0174c build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-12 11:51:33 -08:00
SkyZeroZx a48029b810 docs: correct example for RouteReuseStrategy getRouteKey
Update the example to properly demonstrate the getRouteKey method usage fixes #65021
2025-11-12 11:49:03 -08:00
Angular Robot fc5710bb7f docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-12 11:43:32 -08:00
SkyZeroZx 05ef2a5ca9 docs: correct code block language in error handling and signals interop 2025-11-12 11:35:09 -08:00
Angular Robot 78b1a2e0cc build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-12 11:33:08 -08:00
Angular Robot 8e81d0a9e8 build: update pnpm to v10.21.0
See associated pull request for more information.
2025-11-12 09:42:28 -08:00
Angular Robot 42454b428b build: update bazel dependencies
See associated pull request for more information.
2025-11-12 09:41:05 -08:00
Angular Robot 76a5246943 build: update all non-major dependencies
See associated pull request for more information.
2025-11-12 09:39:55 -08:00
Alan Agius 46099910c0 build: allow any version of @angular/* packages for peer dependencies
This change configures pnpm to allow any version of  `@angular/*` packages to satisfy peer dependencies. This is necessary because `@angular/*` packages are managed within this monorepo, and this rule prevents issues with peer dependency resolution when different versions might be present during development or testing.
2025-11-12 09:35:58 -08:00
Joey Perrott 7d6235f3fb build: use mjs files for ng-dev configuration
In preperation for ng-dev requiring mjs files for configuration, switch over our usage
2025-11-12 09:35:19 -08:00
Alan Agius 0835bd815f build: improve dependency management for local packages
Refactor .pnpmfile.cjs to use a Set for localAngularPackages for better performance.
Adjust typescript dependency handling in compiler-cli to correctly use devDependencies.
Promote rxjs and zone.js from peer dependencies to regular dependencies for local packages.
These changes streamline dependency resolution and align with pnpm's behavior for workspace dependencies.
2025-11-12 09:34:27 -08:00
Alan Agius c51b42f1ce build: remove extra deps
Most of these deps are either unused or are in `adev`
2025-11-12 09:34:27 -08:00
Andrew Kushnir cc095d447c docs: release notes for the v21.0.0-rc.2 release 2025-11-12 08:41:32 -08:00
Andrew Kushnir 1f6de175c9 docs: release notes for the v20.3.11 release 2025-11-12 08:26:29 -08:00
Danny Koppenhagen c3e82fb2d5 refactor(core): render additional WAI-ARIA 1.3 property bindings as attributes
Support additional ARIA properties from Accessible Rich Internet Applications (WAI-ARIA) version 1.3.

| attribute | property |
|-----------|----------|
| `aria-activedescendant`           | `ariaActiveDescendantElement` |
| `aria-colindextext`           | `ariaColIndexText` |
| `aria-controls`           | `ariaControlsElements ` |
| `aria-describeyby`           | `ariaDescribedByElements ` |
| `aria-description`           | `ariaDescription` |
| `aria-details`           | `ariaDetailsElements ` |
| `aria-errormessage`           | `ariaErrorMessageElements ` |
| `aria-flowto`           | `ariaFlowToElements ` |
| `aria-labelledby`           | `ariaLabelledByElements ` |
| `aria-owns`           | `ariaOwnsElements ` |
| `aria-rowindextext`           | `ariaRowIndexText ` |

closes #64847
2025-11-11 14:08:58 -08:00
Matthew Beck 24cfd5a0ed fix(compiler): support complex selectors in :nth-child()
:nth-child() (and its siblings) support complex expressions, e.g.
`:nth-child(2n of :is(.foo, .bar))`. Previously we'd choke because of
the `:is()`. Now, we reuse the `_parenSuffix` subexpression to match
nested parentheses the same way we do for :host() and :host-context().
Note that we only support 3 levels of nesting, so a selector like
`:nth-child(n of :is(:has(:not(.foo))))` will still break.

I'll say yet again that we really should add a proper parser so we stop
getting bug reports like this :)

Fixes #64913
2025-11-11 14:03:32 -08:00
Alan Agius 4ed8781301 refactor(core): improve resource loading with async/await
Refactor  to use async/await for clearer asynchronous operations and enhanced error handling.
Simplify resource caching and streamline the resolution of component templates and styles.
Update  in the router to align with the new async resource resolution.
2025-11-11 12:50:16 -08:00
Andrew Scott 4af408afcb Revert "feat(service-worker): notify clients about version failures (#62718)"
This reverts commit 6d011687ec.

issue #63500 reproduces at head on the main branch in the dev app.
Reverting this change along resolves it.

fixes https://github.com/angular/angular/issues/63500
2025-11-11 12:48:45 -08:00
Leon Senft d337cfb68f feat(forms): add debounce() rule for signal forms
The `debounce()` rule allows developers to control when changes to a
form control are synchronized to the form model.

This feature necessitated some changes to `FieldState`:

  * `controlValue` is a new signal property that represents the current
    value of a form field as it appears in its corresponding control.

  * `value` conceptually remains unchanged; however, its value may lag
    behind that of `controlValue` if a `debounce()` rule is applied.

The `debounce()` rule essentially manages when changes to `controlValue` are
synchronized to `value`. The intent is that an expensive or slow
validation rule can react to the debounced `value`, rather than a more
frequently changing `controlValue`.

Directly updating `value` immediately updates `controlValue`, and cancels any
pending debounced updates.

When multiple `debounce()` rules are applied to the same field, the last
currently active rule is used to debounce an update. These rules are
applied to child fields as well, unless they override them with their
own rule.
2025-11-11 12:00:09 -08:00
Leon Senft 8866934334 refactor(forms): do not infer accumulated metadata type from initial value
This removes the need to specify type arguments for
`reducedMetadataKey()` when the value returned from the `getIntial`
callback is a subtype of the accumulated type.
2025-11-11 12:00:09 -08:00
Angular Robot 631cf977a8 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-11 11:51:05 -08:00
Alan Agius 74dca6eccd build: lock file maintenance
See associated pull request for more information.
2025-11-11 10:50:09 -08:00
Angular Robot 3b1fbf00da build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-11 10:19:24 -08:00
Doug Parker 490435bf76 fix(core): skip Angular formatting when formatting signals recursively
The flag `skipFormatting` got renamed to `ngSkipFormatting` during review of https://github.com/angular/angular/pull/64000, but a couple usages got missed, causing some unfortunate UI recursion.
2025-11-11 10:14:30 -08:00
Kristiyan Kostadinov 8277906455 refactor(compiler): remove unused code
The `fullInheritane` flag from the metadata and the `CopyDefinitionFeature` that it controls appear to no longer be used since `fullInheritance` is always false. The feature appears to have been there to support ngcc which was removed some time ago.
2025-11-11 10:04:29 -08:00
Angular Robot 75dd600570 build: lock file maintenance
See associated pull request for more information.
2025-11-11 08:48:00 -08:00
SkyZeroZx d999667b57 docs: add reference to Built-in Pipes in multiple pipe files 2025-11-11 08:47:07 -08:00
Matthieu Riegler 21ca49cf62 refactor(core): rename ExperimentalIsolatedShadowDom to IsolatedShadowDom
This API is still experimental
2025-11-11 08:46:06 -08:00
Matthieu Riegler 16e61f5dd0 docs(docs-infra): Add support for experimental enum entries 2025-11-11 08:46:06 -08:00
RobinReinecke 07703875b5 docs: correct mermaid code block formatting 2025-11-11 08:33:27 -08:00
SkyZeroZx dde18c2303 docs: improve discoverability in service worker documentation 2025-11-11 08:32:14 -08:00
cexbrayat 800b01f5a1 docs: remove error mentions in signal forms docs
`error` no longer exists and is called `validate`
2025-11-11 08:30:08 -08:00
Doug Parker ec9dc94cee feat(platform-browser): add context to createApplication
This is necessary to use SSR safely with `createApplication` and avoid constraining users to `bootstrapApplication`. It is one more step towards feature parity between `createApplication` and `bootstrapApplication`.
2025-11-10 14:18:29 -08:00
Doug Parker ab67988d2e feat(platform-browser): resolve JIT resources in createApplication
Previously, `createApplication` didn't work with JIT components. This commit brings it closer to feature parity with `bootstrapApplication`.
2025-11-10 14:18:29 -08:00
Devin Chasanoff 5af33724a4 docs: add links to SDUI example and livestream 2025-11-10 14:16:18 -08:00
arturovt feb86e3fde fix(common): remove placeholder image listeners once view is removed
Prior to this commit, attempting to resolve a `ChangeDetectorRef` after views or app have been destroyed would result in an error. In this commit, we clean up listeners once the view is destroyed, before the placeholder loads or fails to load.
2025-11-10 12:05:20 -08:00
Shuaib Hasan Akib b0b834d7f1 refactor(router): add ngDevMode guards to InjectionToken names and cleanup imports
Wraps InjectionToken names with `typeof ngDevMode !== 'undefined' && ngDevMode`
checks to enable tree-shaking of descriptive token names in production builds.
This ensures debug-only strings are removed from production bundles, reducing size.

Also removes unused imports found during refactor.
2025-11-10 12:04:31 -08:00
arturovt d3f67f6ca8 refactor(core): mark VERSION as @__PURE__ for better tree-shaking
Annotate the `new Version(...)` call with `/* @__PURE__ */` to signal to optimizers that the constructor is side-effect free.

Without this hint, bundlers such as Terser or ESBuild may conservatively retain the `VERSION` instantiation even when unused. With the annotation, the constant can be tree-shaken away in production builds if not referenced, reducing bundle size.
2025-11-10 12:04:04 -08:00
Alan Agius d42f9ce3a9 docs: use markdown code fences in service worker docs
Replaces the <docs-code> component with standard markdown code fences in the service worker documentation. This improves the readability and maintainability of the documentation.
2025-11-10 12:03:31 -08:00
Angular Robot 4ff6348c0b docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-10 10:34:39 -08:00
AleksanderBodurri cfb26f5999 feat(devtools): use router state for active route detection
Replace URL-based active route detection with direct traversal of the ActivatedRoute tree.

This solution is more reliable than the previous approach because it directly compares router tree configuration objects against the active router instance state with router.routerState.
2025-11-10 09:50:08 -08:00
SkyZeroZx 55be477979 refactor(http): migrate XSRF classes to use inject() function
Remove constructor injection in favor of inject() calls
2025-11-10 09:49:09 -08:00
arturovt 7724a9460d refactor(router): replace Optional with inject() flags
Replace `@Optional() link: RouterLink` constructor parameter with
`link = inject(RouterLink, {optional: true})` to enable tree-shaking
of the `Optional` decorator and its factory scaffolding.

Bundle size reduction: `Optional` is a runtime value created by
`makeParamDecorator()`. Even in production builds, ESBuild and other
bundlers must keep their factory code because it is referenced via
`Optional`. With `inject()`, this class is no longer referenced,
allowing it and the `makeParamDecorator` scaffolding to be tree-shaken
when unused elsewhere.

Note: This updates the constructor signature but should not be
considered a breaking change. Angular's official guidance is that
directives, components, and pipes should be instantiated by the
framework, not by user code. Directly calling `new RouterLinkActive(...)`
is an unsupported pattern that goes against Angular's design principles.
2025-11-10 09:48:32 -08:00
Angular Robot e5cc6d55e8 build: update all non-major dependencies
See associated pull request for more information.
2025-11-10 09:47:41 -08:00
Angular Robot 050c475b51 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-10 08:23:57 -08:00
Andrew Scott 2db8f2ee75 refactor(router): Add handling of abort event on signal of NavigateEvent
This adds handling of the abort event on the signal of the
`NavigateEvent`, allowing us to cancel the Router's ongoing navigation
transition when its related navigation was aborted.
2025-11-10 08:02:43 -08:00
Shuaib Hasan Akib 27d54654e3 docs: add shell language to CLI installation examples
Added `language="shell"` to installation command examples to display
the shell prompt `$` icon consistently across npm, pnpm, yarn, and bun
code blocks.
2025-11-10 08:01:29 -08:00
Shuaib Hasan Akib e0a4bdd72b docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.,
"src/app/open-close.component.ts" → "open-close.component.ts")
to make code examples cleaner and more focused.
2025-11-10 08:00:33 -08:00
Shuaib Hasan Akib 8c6619a531 docs(docs-infra): removed unused import and use self-closing syntax for component 2025-11-10 08:00:06 -08:00
SkyZeroZx e3fc57e8fc docs: improve discoverability of forms 2025-11-10 07:57:43 -08:00
Angular Robot 47f6f71fc4 build: update dependency marked to v17
See associated pull request for more information.
2025-11-10 07:54:08 -08:00
jnizet afe5fc0399 fix(docs-infra): avoid double slash in sitemap urls
Previously, the URLs in the  generated sitemap contained double slashes between the host and the path. It's not the case anymore.

fix #65022
2025-11-10 07:53:40 -08:00
SkyZeroZx 6a2f4a88de docs: correct import path and self-closing tag in ng-content example 2025-11-10 07:52:46 -08:00
Matthew Beck 4b871b139b test(compiler): add test for :host:has(> .foo)
I took a quick look at my recent changes to see if I had inadvertently
fixed this bug, but I couldn't seem to reproduce it even before my
changes. Seems like it's working, though.

Closes #58436
2025-11-10 07:51:16 -08:00
arturovt 7f95f02d05 refactor(core): tree-shake REF_EXTRACTOR_REGEXP (and dependencies)
`new RegExp()` with computed strings can't be analyzed statically. The bundler can't prove the template string evaluation has no side effects; as thus this expression is considered a side-effect.
2025-11-10 07:48:39 -08:00
Leon Senft 44cd18c183 refactor(forms): remove a TODO and simplify update on <select> mutations
Remove an unnecessary TODO comment. The native `<select>` tracks its
`value` by keeping track of the selected `<option>`. Thus if the value
was set *before* the corresponding option is created, the `<select>`
will ignore it, but the framework doesn't know that and will cache the
bound value anyways. Therefore, checking if the value changed since it
was last bound when the mutation that creates the selected `<option>`
occurs would in fact prevent a needed update, leaving the `<select>` and
field values out of sync.

Furthermore, we know the control type is a native `<select>` element, so
we can update its value directly instead of going through
`updateNativeControl()` which would perform a redundant input type
check.
2025-11-10 07:47:58 -08:00
hawkgs 2d7a72314d fix(devtools): message bus URI conflict between dev and prod apps
\#64806 drops the `href` part of `SamePageMessageBus` URIs. This creates a conflict, which breaks the directive explorer, between the prod Devtools (i.e. the extension) and the dev Devtools app due to the backend URIs using the same string for both prod and dev.
2025-11-10 07:47:37 -08:00
hawkgs 402f396b76 refactor(devtools): update inspect icon
Use a custom version of Material `pin_end` icon that doesn't have a dot.
2025-11-10 07:47:14 -08:00
Danny Koppenhagen d2b854b37e docs(core): add a11y considerations related to @defer()
closes #53466
2025-11-07 15:27:10 -08:00
Andrew Scott 1651908004 refactor(router): Add handler to NavigationInterceptOptions
This adds a handler to the `NavigationInterceptOptions` when we are
intercepting a `NavigateEvent`. This means that the scroll and focus
restoration will be delayed until the handler promise resolves. It also
means that we can provide better indication of an ongoing navigation
event.
2025-11-07 13:32:49 -08:00
Andrew Scott 8bccd8671c refactor(core): Extract NavigateEvent cancel steps based on recent spec update
This updates the cancel/abort steps of fake navigation to match the
current spec.

Relevant commit seems to be
* https://github.com/whatwg/html/commit/b0b40cca16f5d04b7fdca5a1bdca32cc6f824689
2025-11-07 12:54:14 -08:00
Andrew Scott 7a5ac69144 refactor(core): Update commit steps of PlatformNavigation fake to match spec updates
Brings commit steps in line with recent spec updates

* https://github.com/whatwg/html/commit/a3809244c003103243e769855aa4c5792b8937e3
* https://github.com/whatwg/html/commit/bd347bdfebc558f4009109c101bf7fb495400031
2025-11-07 12:54:14 -08:00
Angular Robot a002fb5242 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-07 12:52:35 -08:00
Leon Senft 850f0d6b3d perf(forms): only update interop controls when bound field changes
https://github.com/angular/angular/pull/64590 implemented change
detection for field bindings, but only for those bound to native or
custom form controls. This change extends that optimization to apply to
field bindings on interoperable controls built using Reactive Forms as well.
2025-11-07 11:58:17 -08:00
Kristiyan Kostadinov 877678345a refactor(compiler-cli): update set of required inputs
Updates the required inputs that can be ignored for form controls.
2025-11-07 11:57:50 -08:00
Kristiyan Kostadinov 10915f2f5f test(forms): fix type checking errors in signal form tests
Fixes some type checking errors in the signal forms tests that accumulated while there wasn't any type checking.
2025-11-07 11:57:50 -08:00
Kristiyan Kostadinov 0b6b78ca74 fix(compiler-cli): make field detection logic more robust
Currently the logic for detecting `Field` directives only works if it's imported from `@angular/forms/signals` which doesn't cover our own tests.

These changes make the check more robust.
2025-11-07 11:57:50 -08:00
Kristiyan Kostadinov a61e01d51f fix(compiler-cli): allow value to be set on radio fields
Updates the logic that checks for unsupported bindigns to allow `value` to be set on `radio` controls.
2025-11-07 11:57:50 -08:00
Kristiyan Kostadinov 165634264e fix(compiler-cli): do not flag custom control required inputs as missing when field is present
Adds some logic that won't report the `value` or `checked` inputs as missing when the `Field` directive is present since it will bind to the inputs implicitly.
2025-11-07 11:57:50 -08:00
Kristiyan Kostadinov 4d0778529f fix(compiler-cli): use any when checking field interface conformance
Switches to checking against `FormValueControl<any>` instead of `FormValueControl<unknown>` when checking whether custom controls conform to the interface.

Fixes #64946.
2025-11-07 11:57:50 -08:00
Andrew Scott 4405725943 fix(language-service): address potential memory leak during project creation
This addresses a potential memory leak in plugin-factory.ts.
The require call inside the create function reloads the entire language
service module for every new project, which is inefficient and could be a cause of the memory leak during branch
switching. This ensures the module is loaded only once and the same
instance is shared across all projects.
2025-11-07 11:57:22 -08:00
Alan Agius 033ea75b88 build: update rules_angular to latest
Update `rules_angular` to latest.
2025-11-07 11:43:24 -08:00
Alan Agius 0f55443d9b refactor: exclude tsconfig.json from VSIX package contents (#64991)
The  file is no longer included in the VSCode extension package.
This change updates the golden file and the  file to reflect this exclusion.

PR Close #64991
2025-11-07 11:36:31 -08:00
Alan Agius 74a38f00a0 test: add golden file test for VSCode extension package contents (#64991)
This commit introduces a golden file test to verify the contents of the VSCode extension package.
The test ensures that the list of files included in the extension package remains consistent.

A new Bazel rule  is added to generate the list of files, and  is used to compare it against the golden file. A helper script  is also added to facilitate the generation of the golden file.

PR Close #64991
2025-11-07 11:36:31 -08:00
Matthew Beck 680c3c7bff fix(compiler): support commas in :host() argument
This change adds support for commas in :host() arguments (e.g.
`:host(:not(.foo, .bar))` as well as in nested parens when the argument
is applied without parens (e.g. `:host:not(:has(.foo, .bar))`).
Previously these selectors would receive an extra `[nghost]` attr, e.g.
`[nghost]:not(.foo, [nghost].bar)`.

I didn't file a bug for this one, but it's also blocking on an internal
LSC. Like the other CSS changes, I'll run a TGP to confirm this isn't
breaking.
2025-11-07 10:43:32 -08:00
Shuaib Hasan Akib a2cd36777a docs(docs-infra): use self-closing syntax for component examples
Replaced multiple component tags such as `<example></example>` with
self-closing syntax (`<example />`) across documentation examples.
This improves readability and aligns with the current Angular
style conventions.
2025-11-07 10:24:36 -08:00
Charles Lyding e3143036ba docs: remove invalid service dependency guide section
The current section `Services with dependencies` within the testing services
guide is non-functional and has been removed. The example service is using
`inject` but the test code is using constructor-based injection. The further
sections discuss the use of TestBed to adjust providers which better handles
these cases.
2025-11-07 10:23:47 -08:00
SkyZeroZx dff803514e docs(docs-infra): refactor update to use host property and refactor isWindows 2025-11-07 10:13:23 -08:00
Doug Parker 9432919a8b refactor: enable dev-app sourcemaps in prod and include vendor sourcemaps
This makes it easier to debug in production by including sourcemaps unconditionally. It also processes vendor sourcemaps (which includes Angular FW in this setup) and should improve debuggability of FW code by including sourcemap coverage.
2025-11-07 10:12:58 -08:00
Doug Parker 2150e383d9 refactor: add production devserver to dev-app
This should make it easier to test production bundling and optimizations.
2025-11-07 10:12:58 -08:00
Alon Mishne b481fee049 docs: Update MCP docs to include all current stable and experimental tools 2025-11-07 10:12:30 -08:00
Charles Lyding 2a2397acc4 docs: Update testing guides for Vitest and Karma
This commit updates the testing documentation to reflect the introduction of Vitest as the default test runner, while ensuring Karma testing instructions are still available.

Key changes include:
- Adding a new guide for "Testing with Karma" (`guide/testing/karma.md`).
- Updating the "Code Coverage" guide (`guide/testing/code-coverage.md`) to use `angular.json` for coverage enforcement and referencing Vitest documentation.
- Modifying the "Testing Overview" guide (`guide/testing/overview.md`) to introduce Vitest as the default, update `ng test` output examples, and link to the new Karma guide.
- Updating navigation data to include the new Karma testing guide.
2025-11-07 10:10:26 -08:00
Andrew Scott c91d8203a2 fix(language-server): fix directory renaming on Windows
Hopefully addresses issues on Windows where fs.watch on a directory
locks that directory.

fixes https://github.com/angular/vscode-ng-language-service/issues/1398
2025-11-07 10:09:57 -08:00
Miles Malerba 0efb3f6d1f refactor(forms): nicer type errors
By intersecting with `object` instead of `unknown` in the primitive and
`FormControl` cases, we get TypeScript to show nicer type errors that
mention `FieldTree<...>` insetad of `() => FieldState<...>`
2025-11-07 07:45:05 -08:00
SkyZeroZx c74367c5de refactor(devtools): replace HostListener with host metadata for keydown handling
Uses host metadata instead of the HostListener decorator for keydown events
2025-11-07 07:44:42 -08:00
khanhkhanhlele a625f6bb20 docs: Fix typos in some files 2025-11-07 07:44:03 -08:00
Angular Robot 3cde920ecf build: update all non-major dependencies
See associated pull request for more information.
2025-11-07 07:43:44 -08:00
Jessica Janiuk e703433b4b Revert "feat(core): resource composition via snapshots"
This reverts commit 2a6fdda601.
2025-11-07 07:42:18 -08:00
Angular Robot ff3013c014 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-06 15:28:11 -08:00
Andrew Scott 85d9abb019 refactor(router): Intercept navigate events (unless it's a rollback)
This adds further integration with the browser Navigation API by intercepting the navigation events.
2025-11-06 15:00:08 -08:00
Alex Rickabaugh 2a6fdda601 feat(core): resource composition via snapshots
* Define `ResourceSnapshot<T>` as a type union of possible states for a
`Resource<T>`.
* Add `Resource.snapshot()` to convert a `Resource` to a signal of its
  snapshot.
* Add `resourceFromSnapshots` to convert a reactive snapshot back into a
  `Resource`.

By converting resources from/to `Signal<ResourceSnapshot>`s, full
composition of resources is now possible on top of signal composition APIs
like `computed` and `linkedSignal`.

For example, a common feature request is to have a `Resource` which retains
its value when its reactive source (params) changes. This can now be built
as a utility, leveraging `linkedSignal`'s previous value capability:

```ts
function withPreviousValue<T>(input: Resource<T>): Resource<T> {
  const derived = linkedSignal({
    source: input.snapshot,
    computation: (snap, previous) => {
      if (snap.status === 'loading' && previous?.value) {
        // When the input resource enters loading state, we keep the value
        // from its previous state, if any.
        return {status: 'loading', value: previous.value.value};
      }

      // Otherwise we simply forward the state of the input resource.
      return snap;
    },
  });

  return resourceFromSnapshots(derived);
}

// In application code:

userId = input.required<number>();
user = withPreviousValue(httpResource(() => `/user/{this.userId()}`));
// if `userId()` switches, `user.value()` will keep the old value until
// the new one is ready!
```
2025-11-06 14:59:39 -08:00
tsc036 cf47ce2db9 refactor(core): move profile_types.ts to primtives
move profile_types.ts so the types can be used in Wiz code
2025-11-06 14:22:33 -08:00
Miles Malerba faccf03ee0 refactor(forms): allow FieldTree of recursive type
Adjusts our typings to work better with recursive types and avoid
infinite recursion in the type system.
2025-11-06 13:43:43 -08:00
Miles Malerba 2fd8dc9195 refactor(forms): expose pathKeys as part of the API
Currently we maintain the pathKeys internally, but do not expose them
through the `FieldContext`, this PR updates the `FieldContext` to expose
this property.
2025-11-06 13:43:13 -08:00
Miles Malerba c9058087ae refactor(forms): support dynamic object logic
extends `applyEach` to work on objects as well, conditionally applying
logic to each property of the object.
2025-11-06 13:42:48 -08:00
Angular Robot 88f55b43ac build: update cross-repo angular dependencies to v21.0.0-rc.1
See associated pull request for more information.
2025-11-06 13:23:44 -08:00
Jessica Janiuk 6d1a978729 Revert "build: restrain visibility to compiler-cli subpackages (#64732)"
This reverts commit 70d8ed4488.
2025-11-06 13:09:01 -08:00
Jessica Janiuk 37092d00b7 Revert "refactor(compiler-cli): remove deep imports from compiler-cli (#64732)"
This reverts commit 05938c1054.
2025-11-06 13:09:01 -08:00
Matthieu Riegler 70d8ed4488 build: restrain visibility to compiler-cli subpackages (#64732)
This should solve future deep imports issues.

PR Close #64732
2025-11-06 20:01:26 +00:00
Matthieu Riegler 05938c1054 refactor(compiler-cli): remove deep imports from compiler-cli (#64732)
Accessed symbols are grouped into dedicated `private` entries

PR Close #64732
2025-11-06 20:01:26 +00:00
SkyZeroZx 5343001835 refactor(platform-browser): remove unused Platform ID dependency from DomRendererFactory2
Eliminates the unnecessary injection and usage of Platform ID in the renderer factory logic, along with related test scaffolding cleanup
2025-11-06 12:00:46 -08:00
Angular Robot 3085915a7f build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-06 11:55:54 -08:00
arturovt 9f76fb61df refactor(forms): tree-shake ngControlStatusHost and ngGroupStatusHost
This commit removes `ngGroupStatusHost` variable because it's a side-effect, ending up preserving `ngControlStatusHost` and `ngGroupStatusHost`.
2025-11-06 10:57:45 -08:00
Matthew Berry 444143758e fix(compiler): support one additional level of nesting in :host()
Previously we supported one level of nested parentheses inside of a
`:host()` selector, e.g. `:host(:not(p))`. This caused a breakage in g3
when I migrated a selector from `:host:not(:has(p))` to
`:host(:not(:has(p)))`. This change adds support for just one more level
of nesting.

It'd be nice to move everything to a real CSS parser (or even update it
to count parentheses like I did with :host-context()), but I wasn't able
to get that to work in ~20 minutes and I'm focusing on other things at
the moment.

This change punts the problem until somebody tries to use just one more
level of nesting in a selector.

Fixes #64830
2025-11-06 10:53:42 -08:00
Alan Agius cda013c60f build: improve vscode-ng-language-service release process
This commit improves the release process for the vscode-ng-language-service by adding automated changelog generation and updating the package.json version.
2025-11-06 10:53:09 -08:00
kirjs 60447945bc refactor(forms): add compatForm
This allows using reactive form controls in signal forms
2025-11-06 10:51:28 -08:00
Alan Agius 26fed34e0e build: format md files
This commit configures prettier to format markdown files.
2025-11-06 10:03:05 -08:00
SkyZeroZx 08a84e03e6 refactor(router): simplify imports and improve option access in RouterScroller tests
Simplifies imports and unifies option access in RouterScroller specs for cleaner and more consistent code
2025-11-06 09:42:41 -08:00
Andrew Scott 189807ef04 refactor(router): Build out integration with browser Navigation API (#64905)
This further builds out the Router integration with the platform
Navigation API. Key features in this state include:

* History restoration via direct platform APIs rather than markers left on
  `history.state`. This means more guaranteed correctness and less
  internal code to compute traversal restorations.
* Ability to observe navigations triggered outside the Router APIs.
  Practically speaking, this means some navigations can be performed
  through the platform rather than requiring `Router.navigate`. Note
  that because the `NavigateEvent` is never intercepted at this point of
  the implementation, regular anchor tags cannot be used because they
  will still trigger a popstate navigation.

This implementation does _not_ intercept the `NavigateEvent` but future
iterations should. By omitting the interception, we are missing out on
features such as:

* Platform-supported scroll and focus reset
* Holding the navigate event open for the duration of the router
  navigation, allowing for a visual loading indicator in the browser
* Support for intercepting navigations from regular anchor tags (e.g.
  not `RouterLink`s) and converting those to SPA navigations.

PR Close #64905
2025-11-06 17:42:04 +00:00
Andrew Scott 310cc9b71b build: Add dom-navigation types to router (#64905)
As the integration with the browser navigation API is built out, we will want to have the types available

PR Close #64905
2025-11-06 17:42:04 +00:00
Miles Malerba fa02d96508 test(forms): re-enable some disabled tests
Adjusts test behavior to reflect current implementation and enables them
2025-11-06 09:41:28 -08:00
Angular Robot ffda3f97e0 build: update cross-repo angular dependencies to v21.0.0-rc.1
See associated pull request for more information.
2025-11-06 09:40:51 -08:00
Miles Malerba 25e13e9f96 build: add a dev-app
Adds a dev app that can be used to prototype and debug things while
developing Angular. Use `pnpm dev` to run it.
2025-11-06 09:05:32 -08:00
SkyZeroZx ca3ef38143 refactor(common): Removes unused imports to clean up dependencies
Eliminates unnecessary imports to reduce clutter and improve maintainability
2025-11-06 08:35:28 -08:00
tsc036 104f7d57c1 refactor(core): export types from primitives
export Version type and a type for linkedSignal previous value so they can be used for the Wiz implementations
2025-11-06 08:34:54 -08:00
SkyZeroZx 61066071cf docs: correct formatting in dependency injection guides 2025-11-06 08:34:26 -08:00
Miles Malerba e87f423d90 refactor(forms): add better support for Object.keys and Symbol.iterator
Improves support for using `Object.keys` (and related methods) and
`Symbol.iterator` to work with a `FieldTree` of unknown shape.
2025-11-06 07:51:28 -08:00
Miles Malerba 194b41199b refactor(forms): improved select support
When we set the `value` on a `<select>` element we're really just
setting the selected `<option>`. It treats the selected option as the
source of truth, rather than the actual value. This means that if
options are added or removed or their value changes, the `<select>` may
wind up with a different `value` than what's in our model.

This PR resolves this issue by adding a `MutationObserver` to the select
that is used to resync its value to the model whenever the options may
have changed.
2025-11-06 07:49:06 -08:00
Angular Robot 8315504d60 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-06 07:47:07 -08:00
Joey Perrott de1f22cf2c build: update diff release package script
Update the diff relase package script to properly recursively apply the chmod and support a flag for writing the
diff to a file instead of only logging it to the console.
2025-11-05 15:24:50 -08:00
SkyZeroZx f2ffbe31b0 refactor(devtools): enhance route guard handling and add inline function warning
refactored route guard handling and added warning for inline functions
2025-11-05 15:20:46 -08:00
hawkgs cb5d36d107 refactor(devtools): remove redirecting flag from router tree
Drops `isRedirect` due to its redundancy in light of the newly introduced `redirectTo`.
2025-11-05 15:20:29 -08:00
Angular Robot 76211bf3cc build: update dependency @rollup/plugin-commonjs to v29
See associated pull request for more information.
2025-11-05 15:19:23 -08:00
Angular Robot 9ae1f44ca0 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-05 15:13:56 -08:00
Angular Robot 2b71181288 build: update all non-major dependencies
See associated pull request for more information.
2025-11-05 15:13:37 -08:00
Miles Malerba 59635bba34 docs: improve docs generation for namespaces (#64747)
Improves docs epxerience for interfaces / type aliases that are merged
with a namespace.

PR Close #64747
2025-11-05 22:42:59 +00:00
Miles Malerba 96388b6d8a refactor(forms): improve discoverability of ValidationError flavors (#64747)
Improves discoverability by putting the WithField, WithoutField, etc as
subtypes of the main ValidationError type

PR Close #64747
2025-11-05 22:42:59 +00:00
Angular Robot a54bea5a08 build: update all github actions
See associated pull request for more information.
2025-11-05 14:28:57 -08:00
Angular Robot 62c029fdc2 build: update bazel dependencies
See associated pull request for more information.
2025-11-05 14:23:28 -08:00
Alan Agius e1dfe323d7 build: add VSCode extension release script
This script orchestrates the release process for the Angular Language Service VSCode extension. It handles versioning, changelog generation, building, and publishing the extension.
2025-11-05 19:55:32 +00:00
Erik Wegner e18aac88d4 docs: Add the missing function call to use the signal's actual value 2025-11-05 19:47:02 +00:00
Andrew Scott 4f0f29979c docs: cherrypick release notes for vscode extension 2025-11-05 19:45:48 +00:00
Andrew Scott a487de8bd4 docs: release notes for the v21.0.0-rc.1 release 2025-11-05 19:37:38 +00:00
Andrew Scott aa104c9747 docs: release notes for the v20.3.10 release 2025-11-05 18:58:57 +00:00
Matthieu Riegler 7f44345db3 docs(docs-infra): fix heading layout on mobile
Long code blocks overflow the headings on narrow screen (like mobiles), this messes up the global layout of the page. With the ellipsis with fix that.

fixes #64845
2025-11-05 17:49:43 +00:00
Kristiyan Kostadinov 748caf9a74 test(compiler-cli): set up TCB tests for signal forms
Adds TCB-specific tests for the generated code in signal forms since they tend to be a bit easier to read and follow.
2025-11-05 17:35:43 +00:00
Kristiyan Kostadinov 3c7751020e refactor(compiler-cli): check that custom control conforms to control interfaces
Generates additional type checking code to ensure that custom control conform to either `FormValueControl` or `FormCheckboxControl`.
2025-11-05 17:35:43 +00:00
Kristiyan Kostadinov 04ed91071b refactor(compiler-cli): flag unsupported static bindings on field directives
Expands the diagnostic for unuspported bindings on fields to also capture static attributes.
2025-11-05 17:35:43 +00:00
Kristiyan Kostadinov a5b596b83d refactor(compiler-cli): split up form field ops
Splits up the custom form field and native form field into two separate `TcbOp`s with a shared base class.
2025-11-05 17:35:43 +00:00
Kristiyan Kostadinov f20103a1d7 fix(compiler-cli): report invalid bindings on form controls
Adds validation that users don't bind to unsupported properties on nodes with the `Field` directive.
2025-11-05 17:35:43 +00:00
Kristiyan Kostadinov 948e2f4f01 fix(compiler-cli): infer type of custom field controls
Adds the logic to infer the type of a custom field control that's on the same element as the `Field` directive.
2025-11-05 17:35:43 +00:00
Kristiyan Kostadinov 4b68bddd62 refactor(core): add utility type for extracting the value of a custom control
Adds the `ɵExtractFormControlValue` type that we can use during template type checking to extract the type of a custom control.
2025-11-05 17:35:43 +00:00
Kristiyan Kostadinov 6b51fc3e9d fix(compiler-cli): infer types of signal forms set on native inputs
Sets up the logic for inferring the type of the signal form that is set on a native `input`, `textarea` or `select`.
2025-11-05 17:35:43 +00:00
Kristiyan Kostadinov c5ac77cb32 refactor(compiler-cli): allow the forms module to be loaded in tests
Updates the testing utilities to allow for `@angular/forms` to be loaded.
2025-11-05 17:35:43 +00:00
SkyZeroZx 7c49c5338f refactor(common): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens
2025-11-05 17:08:39 +00:00
Georgi Serev cd0e96c1d0 fix(devtools): router tree details table data
Introduce layout fixes and use dedicated buttons for the view source and navigate actions.
2025-11-05 17:07:18 +00:00
SkyZeroZx 44435ea97b refactor(http): simplifies destruction tracking using destroyed property
Replaces the manual destroyed state with destroyed property
2025-11-05 17:05:24 +00:00
hawkgs 31d412771b refactor(devtools): update the looks of hydration overlay switch
Move the option under the directive explorer and drop the switch to match the rest of the UI.
2025-11-05 17:04:46 +00:00
Jessica Janiuk 373d263834 fix(core): skip leave animations on view swaps
We accounted for skipping leave animations during moves, but not swaps.
This accounts for the swap cases and updates how we deal with swaps and
moves. Now we always queue animations and then essentially dequeue them
if we attach them back in the same render pass.

fixes: #64818
fixes: #64730
2025-11-05 17:04:11 +00:00
Alan Agius 3ef2edc076 build: update typescript dependency for vscode-ng-language-service
Updates the typescript dependency to 5.9.3 in vscode-ng-language-service/package.json
and updates pnpm-lock.yaml accordingly.
2025-11-05 17:02:35 +00:00
Alan Agius 1cd5b44f9c release: bump Angular DevTools version to 1.5.0 2025-11-05 15:52:09 +01:00
Leon Senft 41be02da2f perf(forms): implement change detection for field control bindings
For each field state property, check if it has changed since the last
time it was checked before writing it the corresponding form control
property.

The `pattern` and `required` properties of the field state now return a
default value rather than `undefined` if not defined by metadata.
2025-11-05 00:11:22 +00:00
Lukas Matta 5b210e97af fix(migrations): Prevent removal of templates referenced with preceding whitespace characters
In https://github.com/angular/angular/pull/64745, a fix was introduced for templates referenced with a trailing semicolon. However, templates are still incorrectly removed when there are whitespace characters before the template name.

This commit updates the control flow migration logic to ensure templates referenced with preceding whitespace are not removed.

Fixes #64854
2025-11-04 23:25:59 +00:00
Joey Perrott c277214f91 fix(docs-infra): properly expose the prerendered routes for sitemap generation
Properly expose the prerendered routes for sitemap generation rather than only copying the browser directory
2025-11-04 23:10:58 +00:00
Joey Perrott ffbcf0cede feat(docs-infra): generate the sitemap for angular.dev
We automatically generate the sitemap for the angular.dev deployment and include it in the assets pushed
to firebase.

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
2025-11-04 23:10:58 +00:00
SkyZeroZx b5e37ffb77 docs(docs-infra): add missing meta tags for author, keywords, and Twitter 2025-11-04 22:58:24 +00:00
Angular Robot b7839e872f docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-04 18:54:43 +00:00
Andrew Scott 7f16902a72 refactor(router): Update pre/post wildcard matching to retain 0 or more segment match meaning
Prior to the change to support defining required segments before and after the wildcard, the meaning of the wildcard
path was '0 or more' so path: foo with a child of ** will still match the ** route when the URL is only 'foo'.
If developers want to _require_ something, they can still use path: foo/:anyRequired/**/bar
2025-11-04 17:56:54 +00:00
SkyZeroZx 058377ed55 refactor(devtools): handle function-based redirectTo and title in router viewer
Refactors router viewer logic to properly process and display redirectTo and title when defined as functions
2025-11-04 17:54:07 +00:00
Angular Robot b8b8bad130 build: lock file maintenance
See associated pull request for more information.
2025-11-04 17:52:54 +00:00
Georgi Serev 9fc3873ea3 fix(devtools): SameMessageBus source and destination URIs
Fix the URIs by stripping any query parameters and/or fragments from the compound URLs, since they may prevent the extension from successfully establishing a handshake in some instances.
2025-11-04 17:52:07 +00:00
Angular Robot 608421b83f build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-04 17:50:39 +00:00
Gerome Grignon 8f49af90d0 docs(router): uniformize lazy loading syntax 2025-11-04 17:39:08 +00:00
SkyZeroZx 2ad1b5979f refactor(core): Removes unused flag for onDestroy
Eliminates an unnecessary configuration flag
2025-11-04 04:20:54 +00:00
SkyZeroZx b61847f877 docs: simplify tutorial signals with self-closing component tags 2025-11-04 00:34:37 +00:00
SkyZeroZx 82a579c7e6 docs: Update highlight inputs & code block formatting in component guides 2025-11-04 00:32:38 +00:00
SkyZeroZx 97169b4689 refactor(platform-browser): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens
2025-11-04 00:31:52 +00:00
SkyZeroZx 5e4437baf8 refactor(platform-server): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens
2025-11-04 00:31:52 +00:00
SkyZeroZx 67da4eb04c refactor(router): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens
2025-11-04 00:31:52 +00:00
SkyZeroZx 78e6716f40 refactor(forms): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens
2025-11-04 00:31:52 +00:00
SkyZeroZx 64efbc53aa refactor(core): remove redundant providedIn: 'root' from injection tokens
Removes unnecessary `providedIn: 'root'` declarations from injection tokens
2025-11-04 00:31:52 +00:00
Shuaib Hasan Akib c4c7fb88ac docs: remove standalone: true since it's now the default
Removes redundant `standalone: true` declarations from code examples.
Standalone components are now the default in Angular, so the flag is
no longer necessary in documentation snippets.
2025-11-04 00:26:54 +00:00
marktechson 7a422c209a docs: add v21 landing page
Adds a new landing page for developer events, starting with the v21 page. It also includes an ICS file link for calendar invites. Also updated the tests for the docs-pill to support two new attributes so developers can add the event to their calendars.
2025-11-03 23:59:20 +00:00
SkyZeroZx ffa19ddd3f docs(docs-infra): Improve font loading performance with preconnect
Adds preconnect links for Google Fonts domains to establish early
connections, reducing latency and improving font loading speed
2025-11-03 22:30:59 +00:00
SkyZeroZx 429672d6ab docs(docs-infra): Updates page title strategy to sync meta tags
Ensures that page title changes are reflected in relevant meta tags for improved SEO and sharing support
2025-11-03 21:30:09 +00:00
Kristiyan Kostadinov f233f7420a fix(compiler-cli): make required inputs diagnostic less noisy
Currently when a required input is missing, we produce a diagnostic on the entire start tag. This can be really noisy if there are already some attributes on the element.

This change switch to only highlighting the tag name instead.
2025-11-03 21:27:42 +00:00
Angular Robot 615518d9fd build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-03 21:27:02 +00:00
Matthieu Riegler 434ddbcfc9 docs(docs-infra): ensure all redirections are absolute
fixes #64824
2025-11-03 21:01:45 +00:00
Matthieu Riegler 79b7ac722a refactor(core): Replace usages of the Function type for animations
`Function` is usually not recommended as its not specific enough.
2025-11-03 20:04:55 +00:00
Matthieu Riegler bfdb652f9e docs: remove feature from changelog.
#64584 reverted that change
2025-11-03 19:59:24 +00:00
Angular Robot 86d05eb1d0 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-11-03 19:54:23 +00:00
Joey Perrott 0cb1ade6e5 docs: add the version of angular being used to the footer
Include the version of angular being used for the build in the footer of the application
2025-11-03 19:45:11 +00:00
Jan Martin 50ee2072f6 ci: update handle for jkrems/hybrist
The username was changed earlier today and the old username is no
longer in use.
2025-11-03 19:43:52 +00:00
Angular Robot 2922b411e5 build: update pnpm to v10.20.0
See associated pull request for more information.
2025-10-31 22:15:02 +00:00
Angular Robot 334f856969 build: update dependency bazel to v7.7.0
See associated pull request for more information.
2025-10-31 21:52:29 +00:00
SkyZeroZx a0fe177682 docs(devtools): Removes comment about enum deprecation
Removes comment about enum deprecation
2025-10-30 19:40:07 +00:00
SkyZeroZx bd27e96273 refactor(devtools): Removes redundant input undefined in angularVersion
Simplifies the initialization of the version input by removing
an unnecessary undefined
2025-10-30 19:40:07 +00:00
Kristiyan Kostadinov b9e2ccdda8 refactor(common): remove unused import (#64699)
Cleans up unused code to improve readability and maintainability.

PR Close #64699
2025-10-30 19:27:33 +00:00
Ben Hong f321e226bd docs: update dependency injection guides (part 1) (#63652)
PR Close #63652
2025-10-30 19:22:39 +00:00
Angular Robot 5c5353d1e5 build: update cross-repo angular dependencies (#64795)
See associated pull request for more information.

PR Close #64795
2025-10-30 19:22:04 +00:00
Alan Agius 6f870cead2 ci: refactor cross-repo documentation update scripts (#64792)
Consolidate separate scripts for updating Aria, CDK, and CLI documentation into a single, unified  script. This change streamlines the documentation update process and improves maintainability. The workflow file has been updated to use the new consolidated script.

PR Close #64792
2025-10-30 19:19:20 +00:00
Angular Robot 29d6ebafe5 docs: update Angular Aria apis (#64782)
Updated Angular Aria api files.

PR Close #64782
2025-10-30 18:16:29 +00:00
Matthieu Riegler 56f26f1ada docs(docs-infra): allow cors for json files (#64783)
fixes #64710

PR Close #64783
2025-10-30 17:50:05 +00:00
SkyZeroZx 4dcb3206f7 docs: Standardize route parameter input signal & code block tags in routing docs (#64788)
PR Close #64788
2025-10-30 17:47:58 +00:00
aparziale fd09a698e3 fix(docs-infra): Cannot find module message (#64701)
Fixed the import error message in the editor section. The build would complete successfully, but an error message would be incorrectly reported.

PR Close #64701
2025-10-30 17:42:27 +00:00
Ben Hong 2123cc3a97 docs: add essential signal forms guide (#64665)
PR Close #64665
2025-10-30 17:24:58 +00:00
Joey Perrott 7dcf14dacd ci: make the github action fail when a firebase command fails (#64801)
When a firebase command line execution fails, the github action should be shown as failing instead of continuing to attempt to run and resulting in
an exit code of 0 and success

PR Close #64801
2025-10-30 17:24:25 +00:00
hawkgs c1dee66866 fix(devtools): signal graph value preview mat-tree row indentation (#64798)
Fix the identation and arrows of signal graph value preview mat-tree.

PR Close #64798
2025-10-30 17:18:29 +00:00
Andrew Scott c84d372778 feat(router): Support wildcard params with segments trailing (#64737)
this adds support for both leading and trailing segments before/after wildcard
route. Exposig the segments in a new _splat param would require a
breaking change to the return value of the matchers.

fixes https://github.com/angular/angular/issues/60821

PR Close #64737
2025-10-30 15:44:16 +00:00
Angular Robot b0c9c63784 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-29 21:02:34 +00:00
Andrew Scott fb569ef614 refactor(core): Move patch toggles inside functions to allow tree shaking
In general, global level const will cause DCE bailouts.
2025-10-29 20:57:47 +00:00
Matthieu Riegler cfba831966 refactor(compiler): desambiguate and export RegularExpressionLiteralExpr
This allows all symbols used by `ExpressionVisitor` to be accessible.
2025-10-29 20:45:14 +00:00
Cheng-Hsuan Tsai 3784fbcc12 ci: add workflow to copy and generate aria api pages
- add a script to copy Aria API json files from `angular/aria-builds`.
- build Aria API docs from json files.
2025-10-29 20:38:33 +00:00
Matthieu Riegler 76adbbcd0a refactor(core): expose isWritableSignal to the publicApi
This is alongside the already exisiting isSignal()

fixes #64763
2025-10-29 20:31:41 +00:00
Miles Malerba 662f0e5c00 feat(docs-infra): add support for namespaces
Adds support for generating docs for namespaces (and merged declarations
of namespace + type)
2025-10-29 20:22:21 +00:00
paszesoft 6cc6d93e70 docs: Rename TodoListItem to UserProfile and fix usage of isValidUserId 2025-10-29 18:49:42 +01:00
paszesoft b5dae85b27 Update button disabled property logic in template logical bug fix
isValidUserId = true is logically wrong to use to disable the Save button.
So is logically wrong to use isValidUserId = false to enable the Save button.
Also the default state of this button should be most likely disabled, if we are bothering to check, so the initial value of the signal should most likely be set to true.
To resolve these 2 issues, I propose to use:
- isInValidUserId instead of isValidUserId and:
- isInValidUserId = signal(true); // isValidUserId = signal(false);
After these 2 changes the snippet should make logical sense.
2025-10-29 18:49:42 +01:00
SkyZeroZx f3d056a065 docs(docs-infra): Prevent empty extends clause in interface documentation
Interfaces with no extends clause were incorrectly rendered with a trailing extends keyword followed by nothing, resulting in invalid TypeScript syntax
2025-10-29 18:48:30 +01:00
Shuaib Hasan Akib 5d8b76b4fa fix(docs-infra): extract header attribute as title in multifile code snippets
The DocViewer component's getCodeSnippetsFromMultifileWrapper method was not
extracting the header attribute from nested <docs-code> elements, causing the
ExampleViewer to fall back to displaying file paths instead of custom headers
in tab labels.

This change adds title extraction from the header attribute when processing
multifile code snippets, ensuring that custom headers are properly displayed
in the code viewer tabs.

Fixes #64760
2025-10-29 18:48:00 +01:00
Angular Robot 87a3a92141 docs: update Angular CLI help
Updated Angular CLI help contents.
2025-10-29 18:47:35 +01:00
Kristiyan Kostadinov b67addf99e docs: release notes for the v21.0.0-rc.0 release 2025-10-29 18:45:04 +01:00
Kristiyan Kostadinov df206c98ca docs: release notes for the v21.0.0-next.10 release 2025-10-29 18:41:44 +01:00
Kristiyan Kostadinov a639f7adc3 docs: release notes for the v20.3.9 release 2025-10-29 18:36:50 +01:00
SkyZeroZx aaa3020b94 refactor(devtools): Improves error messaging for profiler file import
Formats error messages to display error name and message when importing profiler files fails
2025-10-29 12:38:20 +01:00
Lukas Matta 64cb08529d fix(migrations): Do not remove a template if it is referenced even with a trailing semilocon
This commit fixes a behavior where under certain conditions, the migration script ignored
a template reference with a trailing semicolon and incorrectly removed the definition
of a referenced template.

Fixes #64741
2025-10-29 10:50:56 +01:00
Alan Agius 13c386936b build: update typescript to 5.9.3
The beta version was unused in the pnpmfile.
2025-10-29 10:46:48 +01:00
Angular Robot 3ed6441d33 build: update github/codeql-action action to v4.31.0
See associated pull request for more information.
2025-10-29 10:42:53 +01:00
Angular Robot f01e904ddd build: update dependency aspect_rules_esbuild to v0.24.0
See associated pull request for more information.
2025-10-29 10:42:28 +01:00
Angular Robot 6bfedec4be build: update dependency node to v22.21.1
See associated pull request for more information.
2025-10-29 10:41:52 +01:00
Angular Robot 5a8aee6edf build: update all non-major dependencies
See associated pull request for more information.
2025-10-29 10:41:22 +01:00
Miles Malerba a7180b65db docs(forms): make FIELD experimental
Adds `@experimental` tag to `FIELD`
2025-10-29 10:40:49 +01:00
Miles Malerba 3d70d68676 refactor(forms): rename the logic property on FieldPathNode
`logic` was a confusing name, as it is a logic builder instance, not a
logic instance.
2025-10-29 10:40:07 +01:00
Miles Malerba fa13a167f1 refactor(forms): preserve logic order when apply is used on root path
In some cases the logic order was not preserved properly when using `apply`. In particular this occurs when some logic is registered on a child of the root, followed by an apply to the root, followed by further logic registered on a child. In this case the final registered logic wound up running before the applied logic.

This happened because `FieldPathNode` for a child path was caching its `LogicNodeBuilder` at creation time. This meant that if the parent's `LogicNodeBuilder` changed (e.g., due to an `apply` call), the child would still be using the old one.

This commit fixes the issue by dynamically resolving the `LogicNodeBuilder` for a child path whenever it is accessed.
2025-10-29 10:40:07 +01:00
Miles Malerba f80b51a738 refactor(forms): track arrays in a parent array by index
This commit changes arrays in a parent array to be tracked the same way
as primitive values like strings and numbers. This is necessary because
the tracking key symbol used to maintain identity for objects in an
array does not survive the array spread operation:

```
return {...oldValue} // tracking symbol preserved ✅
return [...oldValue] // tracking symbol lost ❌
```
2025-10-28 20:52:51 +01:00
Alan Agius 46d5670688 refactor(docs-infra): switch to use unit-test builder
- Deletes the old Karma configuration and test entry point.
- Updates `angular.json` to use the `@angular/build` builders.
- Adjusts test files to align with the new setup.
2025-10-28 20:52:22 +01:00
Alan Agius b4e798ed87 refactor(migrations): exclude all @angular/* packages from schematics bundle
This change updates the rollup configuration for the core schematics to exclude all `@angular/*` packages from the bundle. This is possible following https://github.com/angular/angular/pull/64703

This significantly reduces the size of the `@angular/core` schematics bundle, resulting in a size reduction to 5.8mb.
2025-10-28 20:51:50 +01:00
kirjs c57bbaa87d refactor(forms): Allow returning plain values from validators
This makes the API nicer to use
2025-10-28 20:50:45 +01:00
kirjs 8562e29be4 refactor(forms): Allow returning plain values from validators
This makes the API nicer to use
2025-10-28 20:50:45 +01:00
kirjs 28847c9a19 refactor(forms): Allow returning plain values from validators
This makes the API nicer to use
2025-10-28 20:50:45 +01:00
kirjs b5c29d0d0a refactor(forms): Allow returning plain values from validators
This makes the API nicer to use
2025-10-28 20:50:45 +01:00
Angular Robot 6fa818bc37 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-28 20:48:52 +01:00
Andrew Scott 5a93eeb6c0 Revert "feat(router): Support wildcard params with segments trailing"
This reverts commit 0a0cc27aea.
Causes internal failures with route matching. Should investigate and add
tests to prevent future regressions.
2025-10-28 18:35:27 +01:00
Angular Robot 3032332da0 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-28 10:26:15 -07:00
Matthieu Riegler f2de963bf3 docs(docs-infra): allow cors for json files
fixes #64710
2025-10-28 16:55:52 +01:00
Matthieu Riegler 8e50cdb930 refactor(compiler-cli): Remove deep imports of compiler-cli in angular/core
migration schematics will pull from `compiler-cli/private/migrations`
core tests will pull from `compiler-cli/private/testing`
2025-10-28 15:58:56 +01:00
Shuaib Hasan Akib 33a872d90a fix(docs-infra): update guide navigation to remain active with query params
The navigation list component was using `routerLinkActive` with
`{ exact: true }`, which required an exact URL match including query
parameters. When visiting `/update-guide?v=19.0-20.0&l=1`, the link
`/update-guide` didn't match, so the active class wasn't applied.

Updated `routerLinkActiveOptions` to ignore query parameters while
maintaining exact path matching so the navigation item stays highlighted
when interacting with the update guide form.
2025-10-28 15:58:25 +01:00
Andrew Scott a253739ac8 refactor(core): Remove zone toggles for test and standalone
The migration is complete internally. All that remains is bootstrapModule
2025-10-28 15:57:58 +01:00
arielbackenroth 07b8e953f4 refactor(http): add hooks for propagating traces across XHR callbacks.
Enables propagating a trace across XHR callbacks by providing a hook for
wrapping the callback with a function bound to the send trace context.
2025-10-28 15:08:57 +01:00
tjshiu 763db3a70b docs: align adev best practices with llm-eval 2025-10-28 15:08:12 +01:00
Angular Robot 97e5f570fb build: lock file maintenance
See associated pull request for more information.
2025-10-28 10:27:27 +01:00
Shuaib Hasan Akib e9b29c359d docs: remove shell language from terminal output block
Changed terminal output code block in installation.md from shell
language to plain text to prevent rendering of shell prompt ($).
The block displays read-only log output that users should not
execute as commands.
2025-10-28 10:26:48 +01:00
Angular Robot 1aac438c7a docs: update Angular CLI help
Updated Angular CLI help contents.
2025-10-28 10:26:01 +01:00
Matthieu Riegler be731deb7c docs: callout for provide function order 2025-10-28 10:24:55 +01:00
Shuaib Hasan Akib 8291760f9b refactor(router): remove redundant default value from routerOutletData input
Since `input()` defaults to `undefined`, the explicit initializer was unnecessary.
This improves clarity and reduces boilerplate.
2025-10-28 10:24:22 +01:00
Andrew Scott 0a0cc27aea feat(router): Support wildcard params with segments trailing
this adds support for both leading and trailing segments before/after wildcard
route. Exposig the segments in a new _splat param would require a
breaking change to the return value of the matchers.

fixes https://github.com/angular/angular/issues/60821
2025-10-28 10:23:58 +01:00
Matt Lewis 59e648913c fix(core): Clear lView from IcuIteratorState when stack is empty to prevent memory leak
If a component template contains an icu expression it is being retained until the next change detection cycle for that template. This results in a net retention of only ever a single copy of the given lView but that creates an opportunity for compounding leaks.

Change the icu i18n_icu_container_visitor to free the IcuIteratorState retained lView when the stack is empty so that garbage collection can occur when the view is discarded.
2025-10-27 19:42:18 +01:00
SkyZeroZx bfcaf17005 refactor(devtools): Improves clipboard error feedback with snackbar and logging
Enhances user experience by displaying a snackbar notification when clipboard copy fails, and logs detailed error information via the message bus
2025-10-27 19:41:54 +01:00
Matthieu Riegler eec6669733 refactor(migrations): use the applicationProviders for the zoneless migration
PR #64354 introduced the `applicationProviders` for `bootstrapModule`, this allows a simpler migration output.
2025-10-27 19:41:29 +01:00
Angular Robot b8c8bc6654 build: update rules_angular digest to 1f1aa3e
See associated pull request for more information.
2025-10-27 17:13:39 +01:00
Angular Robot 9f57ca6e8a build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-27 17:13:16 +01:00
Alan Agius 9d00c6892f build: reduce package size of @angular/core
The schematics bundle size is reduced by externalizing @angular/compiler. This reduces the package size from 11mb to 9.1mb.
2025-10-27 17:12:48 +01:00
csorrentino a5678f6f2b refactor(forms): add onError callback to validateHttp for HTTP errors
Adds onError callback inside validateHttp validator in signal forms

PR-Close: #63949
2025-10-27 17:12:25 +01:00
Matthew Beck b478e91068 fix(compiler): support arbitrary nesting in :host-context()
Previously we supported one level of nested pseudo-element selectors
inside :host-context(), e.g. :host-context(:is(.foo, .bar)). This was
based on a regex-based approach. We could support deeper levels of
nesting by updating the regex, but using a regex approach prohibits us
from supporting arbitrary nesting.

Rather than just adding one more level to the existing expression, I've
added a new generator function which splits selectors on commas in a
parenthesis-aware way. This allows us to support arbitrary nesting.

It's likely we'll want to reuse this in other places where we're not as
careful today. We'll probably do this on a request-based basis, though.

Fixes #59176
2025-10-27 13:40:47 +01:00
Alan Agius 7a187a3bfd build: remove unused rollup-plugin-sourcemaps dependency
This dependency is not used as we use `rollup-plugin-sourcemaps2` instead.
2025-10-27 13:39:59 +01:00
Alan Agius fffd34bb6e build: add @babel/core to list of rollup_runtime_deps
This will be needed following https://github.com/devversion/rules_angular/pull/72
2025-10-27 13:39:33 +01:00
Alan Agius 25e8bcbdf6 build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.
2025-10-27 09:31:36 +01:00
Angular Robot 9b0940db37 build: update all github actions to v5
See associated pull request for more information.
2025-10-27 09:30:46 +01:00
Angular Robot ae3a88c5f3 build: update all non-major dependencies
See associated pull request for more information.
2025-10-27 09:30:13 +01:00
Shuaib Hasan Akib 27e183330e fix(docs-infra): preserve shell class for multifile code blocks
The ExampleViewer component was extracting only innerHTML from code
blocks in multifile examples, which lost the shell class applied by
the formatCode function. This caused the $ prompt to not appear for
shell commands in multifile blocks even when language="shell" was set.

Modified the Snippet interface to track shell language state and
updated getCodeSnippetsFromMultifileWrapper and getStandaloneCodeSnippet
methods to preserve the shell class. Updated example-viewer template
to conditionally apply the shell class to the code wrapper element.

Fixes inconsistency between standalone and multifile shell code blocks.
2025-10-27 09:29:37 +01:00
idembele70 202fceed73 docs: fix accessibility of @empty block message 2025-10-27 09:29:10 +01:00
Angular Robot 7e41d6d44a build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-27 09:28:11 +01:00
Miles Malerba 01e1ad2b37 refactor(forms): fix some typos
Fix some typos in signal forms code
2025-10-27 09:27:02 +01:00
Alan Agius 53287bce9b refactor(docs-infra): streamline adev build configuration
This commit introduces a number of changes to streamline the build configuration for adev, the documentation application.
2025-10-27 09:26:23 +01:00
SkyZeroZx c5e6b8bdc8 docs: Adds guide links to HTTP API docs for better discoverability 2025-10-27 09:25:56 +01:00
aparziale e155a1e9d7 refactor: inject an instance of typescript-vfs.worker
Modified tsVfsWorker worker initialization logic
2025-10-27 09:24:55 +01:00
Andrew Scott a03c82564d feat(router): Add scroll behavior controls on router navigation
This commit adds the ability to control the behavior of scrolling in the
`NavigationBehaviorOptions`. The options directly correlate with the
intercept options of the Navigation API `NavigateEvent#intercept`:
https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/intercept#scroll

While we do not currently have an integration with the navigation API,
this change would be necessary to provide the ability to configure that behavior
if/when we do. In the meantime, this option is also useful to control
the behavior of scrolling when the in memory scroller is enabled.

resolves #26744
2025-10-27 09:24:26 +01:00
AleksanderBodurri c963569c0e refactor(devtools): use getRouterInstance to replace manual parsing logic
Previously we would look in the DI tree for a token named 'Router' and resolve its value.

Now we use the already existing getRouterInstance, which depends on ng global debug APIs to get the router instance of an application.
2025-10-27 09:23:16 +01:00
AleksanderBodurri ecfcaba3b1 feat(devtools): Use "App Root" as name for root of router tree.
Previously '/' could cause confusion with other routes that use a path here. I think because this node is unique in that it is not actually a "Route" we should make it clear with the label that is simply the App Root.
2025-10-27 09:22:33 +01:00
Andrew Scott dd09da8ba2 refactor(router): Add provider for integrating with Navigation API and Location shim
This adds a (private) provider for integrating with the browser Navigation API.
This provider ensures that interactions with the `Location` service
use the underlying platform navigation rather than the history and
location APIs.
2025-10-27 09:21:56 +01:00
Kristiyan Kostadinov b5f8d0b5b1 fix(docs-infra): fix broken adev tests
Fixes some adev tests that are broken on main.
2025-10-24 21:28:29 +02:00
Alan Agius 620e2c4926 Revert "build: refactor location of best-practices.md"
This reverts commit 07a51872d5.
2025-10-24 19:02:37 +02:00
Angular Robot d7e5aeaf0d build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-24 18:48:13 +02:00
Angular Robot 1acc0bcef5 build: update all non-major dependencies to v7.28.5
See associated pull request for more information.
2025-10-24 18:47:48 +02:00
Matthieu Riegler 6e7b3c2aa6 docs(docs-infra): Support linking to individual playground templates 2025-10-24 18:47:09 +02:00
SkyZeroZx a3639e2258 feat(common): Blocks IPv6 localhost from preconnect checks
Prevents unnecessary preconnect warnings by adding IPv6 loopback ('[::1]') to the blocklist.
2025-10-24 18:46:43 +02:00
SkyZeroZx 207baad322 refactor(common): Add missing OnDestroy interface in PreconnectLinkChecker
The OnDestroy interface was implemented but not declared; this adds the missing interface declaration
2025-10-24 18:46:43 +02:00
Andrew Scott 48abe007d9 fix(zone.js): Support jasmine v6
This fixes the jasmine patch to ensure we are patching the private APIs
off of the right location, which changed in v6.

see https://github.com/jasmine/jasmine/commit/168ff0a751b6280b170ce097410d77a4c7c1f449
2025-10-24 18:46:04 +02:00
Alan Agius 07a51872d5 build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.
2025-10-24 18:45:32 +02:00
Angular Robot 029ed83e8b docs: update Angular CLI help
Updated Angular CLI help contents.
2025-10-24 16:19:06 +02:00
Angular Robot 1a0d2daef0 build: update all non-major dependencies
See associated pull request for more information.
2025-10-24 15:26:25 +02:00
Angular Robot b258d01f89 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-10-24 15:25:32 +02:00
jase88 cdfd073448 docs: update workspace configuration link in security documentation 2025-10-24 15:25:10 +02:00
SkyZeroZx b1a0bad342 docs: Fix syntax highlighting & formatting in HTTP guide 2025-10-24 15:23:58 +02:00
Matthieu Riegler 57af0d7e1b docs(docs-infra): enable strict templates 2025-10-24 15:23:26 +02:00
Angular Robot 0d38cbf56b docs: update Angular CDK apis (#64643)
Updated Angular CDK api files.

PR Close #64643
2025-10-24 09:38:26 +02:00
Angular Robot 77ead34cc7 build: update dependency vitest to v4 (#64635)
See associated pull request for more information.

PR Close #64635
2025-10-24 09:35:52 +02:00
Angular Robot ccf6721a4d build: update all non-major dependencies (#64634)
See associated pull request for more information.

PR Close #64634
2025-10-24 09:35:15 +02:00
Angular Robot bbae71c93e build: update cypress-io/github-action action to v6.10.3 (#64633)
See associated pull request for more information.

PR Close #64633
2025-10-24 09:34:26 +02:00
Angular Robot f6d7375026 build: update cross-repo angular dependencies (#64629)
See associated pull request for more information.

PR Close #64629
2025-10-24 09:32:54 +02:00
Alan Agius 4887dc883f build: enable auto merge strategy for pull requests (#64624)
This commit enables the 'auto' merge strategy for pull requests.
This strategy automatically determines the best merge method based on the
pull request's commits.

The auto merge strategy can:
- Delegate to the autosquash merge strategy if the PR has fixup/squash
  commits against multiple normal commits.
- Squash commits if the PR has only one normal commit and some
  fixup/squash commits.
- Rebase commits if the PR has no fixup/squash commits.

This improves the developer experience by automating the merge process. A
key benefit is that PRs that can be cleanly rebased will now appear as
'merged' in GitHub's UI, providing a clearer history than the previous
'unmerged' status that could occur with squashing.

Additionally, `dev-infra` and `bazel` are removed from the exempted scopes
for target labels as they are no longer necessary.

PR Close #64624
2025-10-24 09:32:13 +02:00
Matthieu Riegler 15d4bd58d1 fix(forms): interop supports CVAs with signals (#64618)
The directive implemnetation might set CVA values during the template evaluation. Since the template is a reactive context we need to untrack when setting the CVA values to prevent writing to signals in a reactive context.

fixes #64614

PR Close #64618
2025-10-24 09:31:39 +02:00
Andrew Scott e2346dbfac refactor(router): Compress middle of navigation pipeline to fewer operators (#64480)
This cleans up the navigation transitions a bit by removing some
unnecessary operators. Combining operators makes debugging easier by
making it possible to step through the code.

PR Close #64480
2025-10-24 09:31:05 +02:00
Miles Malerba 55e1647e52 fix(core): ensure @for iteration over field is reactive (#64113)
When working with a proxy object such as signal forms' `Field`,
accessing the `lenght` or `Symbol.iterator` may trgger a reactive read.
This change ensures that `@for` properly captrues this before clearing
the active consumer.

PR Close #64113
2025-10-24 09:29:29 +02:00
Miles Malerba 515c2949d8 test(forms): test reactive iteration over array field (#64113)
Adds a test that verifies @for iteration over an array field is actually
reactive to new items being added to the array.

PR Close #64113
2025-10-24 09:29:29 +02:00
Angular Robot e47ef3e691 docs: update Angular CLI help (#64621)
Updated Angular CLI help contents.

PR Close #64621
2025-10-23 18:29:27 +02:00
Angular Robot 13d8ccc41b build: update cross-repo angular dependencies (#64622)
See associated pull request for more information.

PR Close #64622
2025-10-23 18:24:58 +02:00
Miles Malerba ef34e39b2a refactor(forms): rename files related to metadata (#64603)
Renames some files to reflect the property => metadata name change

PR Close #64603
2025-10-23 18:13:16 +02:00
Miles Malerba 884765be56 refactor(forms): rename field state related to metdata (#64603)
Renames the field state related to metadata to reflect the new
"metadata" name. In particular:
- `property(...)` is renamed to `metadata(...)`
- `hasProperty(...)` is renamed to `hasMetadata(...)`

PR Close #64603
2025-10-23 18:13:16 +02:00
Miles Malerba b29e6469ed refactor(forms): rename logic functions related to metadata (#64603)
Renames logic functions related to metadata to align with the new
"metadata" name. Notably:
- `property(...)` => `metadata(...)`
- `aggregateProperty(...)` => `aggregateMetadata(...)`

PR Close #64603
2025-10-23 18:13:16 +02:00
Miles Malerba ef37ecf444 refactor(forms): rename Property and AggregateProperty (#64603)
These have been renamed to `MetadataKey` and `AggregateMetadataKey`
respectively. The team consensus is that the term "property" is so
overloaded that it makes the topic difficult to explain & discuss, hence
the rename.

PR Close #64603
2025-10-23 18:13:16 +02:00
Angular Robot 6a3e881542 build: update cross-repo angular dependencies (#64616)
See associated pull request for more information.

PR Close #64616
2025-10-23 16:01:28 +02:00
Angular Robot 3ace778667 build: update cross-repo angular dependencies (#64609)
See associated pull request for more information.

PR Close #64609
2025-10-23 12:39:17 +02:00
Angular Robot 07a6379de4 build: update pnpm to v10.19.0 (#64606)
See associated pull request for more information.

PR Close #64606
2025-10-23 12:37:04 +02:00
Angular Robot 69b167c9d4 build: update dependency aspect_rules_js to v2.7.0 (#64605)
See associated pull request for more information.

PR Close #64605
2025-10-23 12:36:15 +02:00
Angular Robot e944763e12 build: update dependency preact-render-to-string to v6.6.3 (#64604)
See associated pull request for more information.

PR Close #64604
2025-10-23 12:35:26 +02:00
SkyZeroZx 03f90d7e56 docs: Add router config options (#64529)
PR Close #64529
2025-10-23 12:34:55 +02:00
Andrew Scott d4d6c28023 fix(router): handle parenthesized outlets without a name in DefaultUrlSerializer (#64507)
Previously, the `DefaultUrlSerializer` would incorrectly parse URLs with a parenthesized outlet that did not have a name, such as `/(left)`. This would result in an `undefined` outlet name in the serialized URL.

This commit fixes the issue by ensuring that parenthesized outlets without a name are treated as primary outlets.

fixes #58516. Based on the description, either the URL was constructed
manually or by custom serializer.

PR Close #64507
2025-10-23 12:33:57 +02:00
Andrew Scott ced2fa5253 refactor(zone.js): Improve missing proxy zone error for jest imported (#64497)
test functions

This improves the fakeAsync error message when importing it, describe,
etc from jest

We will not be further expanding the ZoneJS patches to support
additional use-cases.

fixes #47603

PR Close #64497
2025-10-22 23:26:23 +00:00
Angular Robot f0debd5245 build: update cross-repo angular dependencies (#64597)
See associated pull request for more information.

PR Close #64597
2025-10-22 21:45:34 +00:00
Jessica Janiuk be1598fded docs: release notes for the v21.0.0-next.9 release 2025-10-22 14:27:02 -07:00
Jessica Janiuk b21ed32ec0 release: bump the next branch to v21.1.0-next.0 2025-10-22 14:27:02 -07:00
4734 changed files with 296185 additions and 189344 deletions
+1
View File
@@ -0,0 +1 @@
../../AGENTS.md
+178
View File
@@ -0,0 +1,178 @@
---
name: adev-writing-guide
description: Comprehensive writing guide for Angular documentation (adev). Covers Google Technical Writing standards, Angular-specific markdown extensions, code blocks, and components. You MUST use this skill any time you plan to create, edit, or review documentation files in `adev/` or `adev/src/content`.
---
# Angular Documentation (adev) Writing Guide
This skill provides comprehensive guidelines for authoring content in `adev/src/content`. It combines Google's technical writing standards with Angular-specific markdown conventions, components, and best practices.
## I. Google Technical Writing Guidelines
### Tone and Content
- **Be conversational and friendly:** Maintain a helpful yet professional tone. Avoid being overly casual.
- **Write accessibly:** Ensure documentation is understandable to a diverse global audience, including non-native English speakers.
- **Audience-first:** Focus on what the user needs to do, not just what the system does.
- **Avoid pre-announcing:** Do not mention unreleased features or make unsupported claims.
- **Use descriptive link text:** Link text should clearly indicate the destination (e.g., avoid "click here").
### Language and Grammar
- **Use second person ("you"):** Address the reader directly.
- **Prefer active voice:** Clearly state who or what is performing the action (e.g., "The system generates a token" vs "A token is generated").
- **Standard American English:** Use standard American spelling and punctuation.
- **Conditional clauses first:** Place "if" or "when" clauses before the instruction (e.g., "If you encounter an error, check the logs").
- **Define terms:** Introduce new or unfamiliar terms/acronyms upon first use.
- **Consistent terminology:** Use the same term for the same concept throughout the document.
- **Conciseness:** Aim for one idea per sentence. Keep sentences short.
### Formatting and Organization
- **Sentence case for headings:** Capitalize only the first word and proper nouns in titles and headings.
- **Lists:**
- **Numbered lists:** Use for sequential steps or prioritized items.
- **Bulleted lists:** Use for unordered collections of items.
- **Description lists:** Use for term-definition pairs.
- **Serial commas:** Use the Oxford comma (comma before the last item in a list of three or more).
- **Code formatting:** Use code font for code-related text (filenames, variables, commands).
- **UI Elements:** formatting user interface elements in **bold**.
- **Date formatting:** Use unambiguous formats (e.g., "September 4, 2024" rather than "9/4/2024").
- **Structure:** Use logical hierarchy with clear introductions and navigation. Headings should be task-based where possible.
### Images and Code Samples
- **Images:** Use simple, clear illustrations to enhance understanding.
- **Captions:** Write captions that support the image.
- **Code Samples:**
- Ensure code is correct and builds without errors.
- Follow language-specific conventions.
- **Comments:** Focus on _why_, not _what_. Avoid commenting on obvious code.
### Reference Hierarchy
1. Project-specific style guidelines (if any exist in `CONTRIBUTING.md` or similar).
2. Google Developer Documentation Style Guide.
3. Merriam-Webster (spelling).
4. Chicago Manual of Style (non-technical).
5. Microsoft Writing Style Guide (technical).
---
## II. Angular Documentation Specifics
### Code Blocks
Use the appropriate language identifier for syntax highlighting:
- **TypeScript (Angular):** Use `angular-ts` when TypeScript code examples contain inline templates.
- **HTML (Angular):** Use `angular-html` for Angular templates.
- **TypeScript (Generic):** Use `ts` for plain TypeScript.
- **HTML (Generic):** Use `html` for plain HTML.
- **Shell/Terminal:** Use `shell` or `bash`.
- **Mermaid Diagrams:** Use `mermaid`.
#### Attributes
You can enhance code blocks with attributes in curly braces `{}` after the language identifier:
- `header="Title"`: Adds a title to the code block.
- `linenums`: Enables line numbering.
- `highlight="[1, 3-5]"`: Highlights specific lines.
- `hideCopy`: Hides the copy button.
- `prefer`: Marks code as a preferred example (green border/check).
- `avoid`: Marks code as an example to avoid (red border/cross).
**Example:**
````markdown
```angular-ts {header:"My Component", linenums, highlight="[2]"}
@Component({
selector: 'my-app',
template: '<h1>Hello</h1>',
})
export class App {}
```
````
#### `<docs-code>` Component
For more advanced code block features, use the `<docs-code>` component:
- `path`: Path to a source file (e.g., `adev/src/content/examples/...`).
- `header`: Custom header text.
- `language`: Language identifier (e.g., `angular-ts`).
- `linenums`: Boolean attribute.
- `highlight`: Array of line numbers/ranges (e.g., `[[3,7], 9]`).
- `diff`: Path to diff file.
- `visibleLines`: Range of lines to show initially (collapsible).
- `region`: Region to extract from source file.
- `preview`: Boolean. Renders a live preview (StackBlitz). _Only works with standalone examples._
- `hideCode`: Boolean. Collapses code by default.
**Multifile Example:**
```html
<docs-code-multifile path="..." preview>
<docs-code path="..." />
<docs-code path="..." />
</docs-code-multifile>
```
### Alerts / Admonitions
Use specific keywords followed by a colon for alerts. These render as styled blocks.
- `NOTE:` For ancillary information.
- `TIP:` For helpful hints or shortcuts.
- `IMPORTANT:` For crucial information.
- `CRITICAL:` For warnings about potential data loss or severe issues.
- `TODO`: For incomplete documentation.
- `QUESTION:` To pose a question to the reader.
- `SUMMARY:` For section summaries.
- `TLDR:` For concise summaries.
- `HELPFUL:` For best practices.
**Example:**
```markdown
TIP: Use `ng serve` to run your application locally.
```
### Custom Components
- **Cards (`<docs-card>`):**
- Must be inside `<docs-card-container>`.
- Attributes: `title`, `link`, `href`.
- **Callouts (`<docs-callout>`):**
- Attributes: `title`, `important`, `critical`.
- **Pills (`<docs-pill>`):**
- Must be inside `<docs-pill-row>`.
- Attributes: `title`, `href`.
- **Steps / Workflow (`<docs-step>`):**
- Must be inside `<docs-workflow>`.
- Attributes: `title`.
- **Tabs (`<docs-tab>`):**
- Must be inside `<docs-tab-group>`.
- Attributes: `label`.
- **Videos (`<docs-video>`):**
- Attributes: `src` (YouTube embed URL), `alt`.
### Images
Use standard markdown syntax with optional attributes for sizing and loading behavior.
- `#small`, `#medium`: Append to image URL for sizing.
- `{loading: 'lazy'}`: Add attribute for lazy loading.
**Example:**
```markdown
![Alt Text](path/to/image.png#medium {loading: 'lazy'})
```
### Headers
- Use markdown headers (`#`, `##`, `###`).
- Ensure a logical hierarchy (don't skip levels).
- `h2` and `h3` are most common for content structure.
+133
View File
@@ -0,0 +1,133 @@
---
name: PR Review
description: Guidelines and tools for reviewing pull requests in the Angular repository.
---
# PR Review Guidelines
When reviewing a pull request for the `angular` repository, follow these essential guidelines to ensure high-quality contributions:
1. **Context & Ecosystem**:
- Keep in mind that this is the core Angular framework. Changes here can impact millions of developers.
- Be mindful of backwards compatibility. Breaking changes require strict approval processes and deprecation periods.
2. **Key Focus Areas**:
- **Comprehensive Reviews**: You **MUST always** perform a deep, comprehensive review of the _entire_ pull request. If the user asks you to look into a specific issue, file, or area of concern, you must investigate that specific area _in addition to_ reviewing the rest of the PR's substantive changes. Do not terminate your review after addressing only the user's focal point.
- **Package-Specific Guidelines**: Check if there are specific guidelines for the package being modified in the `reference/` directory (e.g., `reference/router.md`). Always prioritize these rules for their respective packages.
- **Commit Messages**: Evaluate the quality of commit messages. They should explain the _why_ behind the change, not just the _what_. Someone should be able to look at the commit history years from now and clearly understand the context and reasoning for the change.
- **Code Cleanliness**: Ensure the code is readable, maintainable, and follows Angular's project standards.
- **Performance**: Look out for code that might negatively impact runtime performance or bundle size, particularly in hot paths like change detection or rendering.
- **Testing**: Ensure all new logic has comprehensive tests, including edge cases. **Do NOT run tests locally** as part of your review process. CI handles this automatically, and running tests locally is redundant and inefficient.
- **API Design**: Ensure new public APIs are well-designed, consistent with existing APIs, and properly documented.
- **Payload Size**: Pay attention to the impact of changes on the final client payload size.
3. **Execution Workflow**:
Determine the appropriate review method. If the user explicitly asks for a `remote` or `local` review in their request, that takes precedence (e.g. "leave comments on the PR" implies `remote`). Otherwise, use the GitHub MCP or available scripts to determine if the review should be `local` or `remote`.
**Common Review Practices (Applies to both Local and Remote)**
- **Preparation & Checklist**:
- First, create a task list (e.g., in `task.md`) that you can easily reference containing **all** the review requirements from the "Key Focus Areas" section (Commit Messages, Performance, Testing, etc.), along with any specific review notes or requests from the user.
- Before doing an in-depth review, expand this list into more detailed items of what you plan to explore and verify in the PR.
- As you conduct the review, check off items in this list, adding your assessment or findings underneath each item.
- At the end of your review, refer back to the checklist to ensure every single requirement was completely verified.
- **Fetch PR Metadata Safely**: When you need to read the PR description or context, do NOT use `gh pr view <PR_NUMBER>` by itself, as its default GraphQL query may fail due to lack of `read:org` and `read:discussion` token scopes. Instead, use `read_url_content` on the PR URL or use `gh pr view <PR_NUMBER> --json title,body,state,author`.
- **Check Existing Comments First**: Before formulating feedback, use the GitHub MCP or available scripts to fetch existing comments on the PR. Review this feedback to avoid duplicate comments, and incorporate its insights into your own review process.
- **Constructive Feedback**: Provide clear, actionable, and polite feedback. Explain the _why_ behind your suggestions or edits. Do **NOT** leave inline comments purely to praise, agree with, or acknowledge a correct implementation detail, as this clutters the review. If you want to praise the PR, do so in the single general PR comment.
**A. Local Code Review (If the PR is owned by the author requesting the review)**
- **Checkout**: Check out the PR branch locally (if it doesn't already exist, fetch it). If checking out the branch fails due to a worktree claim (e.g. "fatal: '<branch>' is already used by worktree at '<path>'"), do the review in that directory.
- **Review & Edit**: Execute the review directly on the code. Instead of adding inline PR comments for suggestions, format the codebase or apply the edits directly to the files.
- **Feedback**: Summarize the review findings and the concrete changes you made in a message to the user, referencing the completed items from your checklist.
- **Do NOT Commit or Push**: Leave the changes uncommitted in the working directory so the user can easily review the pending edits locally. Let the user know the changes are ready for their review, but do not ask for approval to push.
- **Resolve Comments**: Once the user confirms the changes are good and should be committed/pushed, respond to the existing comments as 'resolved' using the GitHub MCP or available scripts.
**B. Remote Code Review (For all other PRs)**
- **Batching Comments (MCP Server - Preferred)**: If you have the GitHub MCP Server configured, you **MUST** follow this workflow to avoid spamming the author with multiple notifications:
1. Create a pending review using `mcp_github-mcp-server_pull_request_review_write` (method `create`).
2. Add your inline comments to the pending review using `mcp_github-mcp-server_add_comment_to_pending_review`.
3. Submit the review using `mcp_github-mcp-server_pull_request_review_write` (method `submit_pending`).
- **Batching Comments (Scripts - Fallback)**: If you do **NOT** have access to the GitHub MCP Server (e.g., specific MCP tools are missing from your context), fallback to using the provided scripts. Use `post_inline_comment.sh` to stage your comments locally. Once all comments are staged, you **MUST** call `submit_pr_review.sh` to publish them as a single batched review (and send a single notification). Try to keep comments minimal or use a general comment if you have many suggestions.
- **Use Suggested Changes**: Whenever appropriate (e.g., for simple code fixes, refactoring suggestions, or typo corrections), prefer using GitHub's **Suggested Changes** syntax (`suggestion ... `) in your inline comments. This allows the author to apply your suggested code improvements with a single click in the GitHub UI.
- **Review Type**: Never mark an external PR review as an "approval" unless explicitly instructed by a repo maintainer. Always use "Request Changes" or "Comment". Note that some tools might only support commenting.
- **Require User Approval Before Posting**: Prepare your review comments and present them to the user, alongside a summary of your completed checklist. Do NOT post comments to the PR without explicitly asking the user for permission first. Only post the review after the user approves.
- **Prefix Agent Comments**: To make it clear when comments are generated and posted by an AI agent rather than a human user, **always** prefix your review comments with `AGENT: `.
## Available Tools
The following tools are available for remote interactions. We prefer using standard **GitHub MCP Server** tools when available. If you do not have the MCP server set up, you **MUST** fallback to using the custom bash scripts.
### GitHub MCP Tools (Preferred)
- `mcp_github-mcp-server_pull_request_review_write`
- `mcp_github-mcp-server_add_comment_to_pending_review`
### Custom Bash Scripts (Fallback)
The following scripts are provided as fallbacks if the MCP server is not available. Note that they rely on the `gh` CLI being correctly installed and authenticated in the local environment.
### `determine_review_type.sh`
Determines whether to use the Local or Remote review workflow by checking if the currently authenticated GitHub user via the `gh` CLI matches the author of the pull request.
**Usage:**
```bash
.agent/skills/pr_review/scripts/determine_review_type.sh <PR_NUMBER>
```
### `get_pr_comments.sh`
Fetches all existing inline comments on a PR using the GitHub API. This is crucial for reviewing other contributors' feedback and avoiding duplicate comments. It outputs JSON containing the `id`, `path`, `line`, `body`, and `user` for each comment.
**Usage:**
```bash
.agent/skills/pr_review/scripts/get_pr_comments.sh <PR_NUMBER>
```
### `reply_pr_comment.sh`
Replies to an existing PR comment thread. This is useful for marking comments as resolved after addressing them in a local code review. Note that the `COMMENT_ID` must be the ID of the top-level comment in the thread.
**Usage:**
```bash
.agent/skills/pr_review/scripts/reply_pr_comment.sh <PR_NUMBER> <COMMENT_ID> <REPLY_BODY>
```
### `post_inline_comment.sh`
The GitHub CLI `gh pr review` command does not natively support adding inline comments to specific lines of code via its standard flags. This script wraps the GitHub API to stage comments locally. They will not be published until you call `submit_pr_review.sh`.
**Usage:**
```bash
.agent/skills/pr_review/scripts/post_inline_comment.sh <PR_NUMBER> <FILE_PATH> <LINE_NUMBER> <COMMENT_BODY>
```
**Example:**
```bash
.agent/skills/pr_review/scripts/post_inline_comment.sh 12345 "packages/core/src/render3/instructions/element.ts" 42 "AGENT: Consider the performance implications here."
```
### `submit_pr_review.sh`
Submits all locally staged inline comments as a single batched review via the GitHub Pull Request Reviews API.
**Usage:**
```bash
.agent/skills/pr_review/scripts/submit_pr_review.sh <PR_NUMBER> <EVENT_TYPE> [BODY]
```
**Options:**
- `EVENT_TYPE`: Must be `COMMENT`, `APPROVE`, or `REQUEST_CHANGES`. Never use `APPROVE` for external PRs.
- `BODY`: (Optional) A general summary comment for the review.
**Example:**
```bash
.agent/skills/pr_review/scripts/submit_pr_review.sh 12345 COMMENT "AGENT: I have left a few inline suggestions for your consideration."
```
@@ -0,0 +1,7 @@
# Router PR Review Guidelines
When reviewing pull requests that modify the Angular Router (`packages/router`), pay special attention to the following:
- **Timing Sensitivity**: The router is extremely sensitive to timing changes. Any changes that alter the asynchronous timing of navigations, resolvers, or guards are almost always breaking changes and must be scrutinized carefully.
- **Testing Practices**: Tests should usually use the `RouterTestingHarness`. Many existing tests are older and do not use this harness. Do not blindly follow the shape of existing tests when writing or reviewing new ones; encourage the use of modern testing utilities.
- **Feature Justification**: Changes to router core code should be well-justified. Consider whether the change is proven to be a core developer ask, such as resolving a highly upvoted GitHub issue or addressing a critical bug.
+32
View File
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -euo pipefail
# determine_review_type.sh <PR_NUMBER>
# Determines if the PR should be reviewed locally or remotely based on author.
if [ -z "$1" ]; then
echo "Usage: determine_review_type.sh <PR_NUMBER>"
exit 1
fi
PR_NUMBER=$1
# Get current authenticated user
CURRENT_USER=$(gh api user -q .login 2>/dev/null)
if [ $? -ne 0 ]; then
echo "Error: Could not determine current GitHub user. Are you logged in to gh?"
exit 1
fi
# Get PR author
PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author -q .author.login 2>/dev/null)
if [ $? -ne 0 ]; then
echo "Error: Could not retrieve PR information for $PR_NUMBER."
exit 1
fi
if [ "$CURRENT_USER" = "$PR_AUTHOR" ]; then
echo "local"
else
echo "remote"
fi
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
# get_pr_comments.sh
# Fetches existing inline comments on a PR to avoid duplicate reviews.
# Usage: ./get_pr_comments.sh <PR_NUMBER>
if [ "$#" -lt 1 ]; then
echo "Usage: $0 <PR_NUMBER>"
exit 1
fi
PR_NUMBER="$1"
# Ensure gh cli is installed
if ! command -v gh &> /dev/null; then
echo "Error: gh CLI could not be found. Please install and authenticate."
exit 1
fi
# Get the current repository (e.g., angular/angular)
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
# Fetch comments
gh api \
--paginate \
-H "Accept: application/vnd.github+json" \
"/repos/${REPO}/pulls/${PR_NUMBER}/comments" \
--jq '.[] | {id: .id, path: .path, line: .line, body: .body, user: .user.login}'
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -euo pipefail
# post_inline_comment.sh
# Adds an inline comment to a specific line in a PR via the GitHub API.
# Usage: ./post_inline_comment.sh <PR_NUMBER> <FILE_PATH> <LINE_NUMBER> <COMMENT_BODY>
if [ "$#" -lt 4 ]; then
echo "Usage: $0 <PR_NUMBER> <FILE_PATH> <LINE_NUMBER> <COMMENT_BODY>"
exit 1
fi
PR_NUMBER="$1"
FILE_PATH="$2"
LINE="$3"
BODY="$4"
# Ensure gh cli is installed
if ! command -v gh &> /dev/null; then
echo "Error: gh CLI could not be found. Please install and authenticate."
exit 1
fi
# Get the current repository (e.g., angular/angular)
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
echo "Staging inline comment for PR #${PR_NUMBER} on ${FILE_PATH}:${LINE}..."
COMMENT_FILE="/tmp/angular_pr_${PR_NUMBER}_comments.json"
if [ ! -f "$COMMENT_FILE" ]; then
echo "[]" > "$COMMENT_FILE"
fi
# Append the new comment to the JSON array
jq --arg path "${FILE_PATH}" --argjson line "${LINE}" --arg body "${BODY}" \
'. += [{"path": $path, "line": $line, "body": $body}]' "$COMMENT_FILE" > "${COMMENT_FILE}.tmp" && mv "${COMMENT_FILE}.tmp" "$COMMENT_FILE"
echo "Comment successfully staged locally. Remember to call submit_pr_review.sh when finished to publish all comments as a single review!"
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -euo pipefail
# reply_pr_comment.sh <PR_NUMBER> <COMMENT_ID> <REPLY_BODY>
# Replies to an existing PR comment thread. Note: COMMENT_ID must be the ID of the top-level comment in the thread you are replying to.
if [ "$#" -lt 3 ]; then
echo "Usage: reply_pr_comment.sh <PR_NUMBER> <COMMENT_ID> <REPLY_BODY>"
exit 1
fi
PR_NUMBER="$1"
COMMENT_ID="$2"
BODY="$3"
# Ensure gh cli is installed
if ! command -v gh &> /dev/null; then
echo "Error: gh CLI could not be found. Please install and authenticate."
exit 1
fi
# Get the current repository (e.g., angular/angular)
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
# Reply to the thread using the provided comment ID
gh api \
--silent \
--method POST \
-H "Accept: application/vnd.github+json" \
"/repos/${REPO}/pulls/${PR_NUMBER}/comments/${COMMENT_ID}/replies" \
-f body="$BODY"
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
set -euo pipefail
# submit_pr_review.sh
# Submits a batched PR review using comments previously staged by post_inline_comment.sh
# Usage: ./submit_pr_review.sh <PR_NUMBER> <EVENT_TYPE> [BODY]
# EVENT_TYPE must be COMMENT, APPROVE, or REQUEST_CHANGES
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <PR_NUMBER> <EVENT_TYPE> [BODY]"
echo "EVENT_TYPE must be COMMENT, APPROVE, or REQUEST_CHANGES"
exit 1
fi
PR_NUMBER="$1"
EVENT="$2"
BODY="${3:-}"
COMMENT_FILE="/tmp/angular_pr_${PR_NUMBER}_comments.json"
if ! command -v gh &> /dev/null; then
echo "Error: gh CLI could not be found. Please install and authenticate."
exit 1
fi
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
# Check if there are staged comments
COMMENTS="[]"
if [ -f "$COMMENT_FILE" ]; then
COMMENTS=$(cat "$COMMENT_FILE")
fi
echo "Submitting review for PR #${PR_NUMBER}..."
# Create the payload
PAYLOAD_FILE="/tmp/angular_pr_${PR_NUMBER}_payload.json"
jq -n --arg event "$EVENT" --arg body "$BODY" --argjson comments "$COMMENTS" \
'{event: $event, body: $body, comments: $comments}' > "$PAYLOAD_FILE"
# Post the review using the GitHub Pull Request Reviews API
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/${REPO}/pulls/${PR_NUMBER}/reviews" \
--input "$PAYLOAD_FILE"
echo "Review submitted successfully!"
rm -f "$COMMENT_FILE"
rm -f "$PAYLOAD_FILE"
@@ -0,0 +1,91 @@
---
name: reference-compiler-cli
description: Explains the mental model and architecture of the code under `packages/compiler-cli`. You MUST use this skill any time you plan to work with code in `packages/compiler-cli`
---
# Angular Compiler CLI (`ngtsc`) Architecture
## Overview
The `packages/compiler-cli` package contains the Angular Compiler (Ivy), often referred to as `ngtsc`. It is a wrapper around the TypeScript compiler (`tsc`) that extends it with Angular-specific capabilities.
The core goal of `ngtsc` is to compile Angular decorators (like `@Component`, `@Directive`, `@Pipe`) into static properties on the class (Ivy instructions, e.g., `static ɵcmp = ...`). It also performs template type checking and ahead-of-time (AOT) compilation.
## Mental Model
The compiler is designed as a **lazy, incremental, and partial** compilation pipeline.
1. **Wrapper Pattern**: `NgtscProgram` wraps the standard `ts.Program`. It intercepts calls to act as a drop-in replacement for standard tooling.
2. **Traits System**: Every class with an Angular decorator is considered a "Trait". The compiler manages the state of these traits through a state machine:
- **Pending**: Detected but not processed.
- **Analyzed**: Metadata extracted, template parsed (but dependencies not yet linked).
- **Resolved**: Dependencies (directives/pipes in template) resolved, import cycles handled.
- **Skipped**: Not an Angular class.
3. **Lazy Analysis**: Analysis only happens when necessary (e.g., when diagnostics are requested or emit is prepared).
4. **Output AST**: The compiler generates an intermediate "Output AST" (`o.Expression`) for the generated code, which is then translated into TypeScript AST nodes during the emit phase.
## Key Subsystems
### 1. Core Orchestration (`ngtsc/core`)
- **`NgtscProgram`**: The public API implementing `api.Program`. It manages the `ts.Program` and the `NgCompiler`.
- **`NgCompiler`**: The brain of the compiler. It orchestrates the compilation phases (Analysis, Resolution, Type Checking, Emit). It holds the `TraitCompiler`.
### 2. Trait Compilation (`ngtsc/transform`)
- **`TraitCompiler`**: Manages the lifecycle of "Traits". It iterates over source files, identifies decorated classes, and delegates to the appropriate `DecoratorHandler`.
- **`Trait`**: A state container for a class, holding its handler, analysis results, and resolution results.
### 3. Decorator Handlers (`ngtsc/annotations`)
- **`DecoratorHandler`**: An interface for handling specific decorators.
- **`ComponentDecoratorHandler`**: The most complex handler. It:
- Extracts metadata (selector, inputs, outputs).
- Parses the template.
- Resolves used directives and pipes (`R3TargetBinder`).
- Generates the `ɵcmp` instruction.
- **`DirectiveDecoratorHandler`**, **`PipeDecoratorHandler`**, **`NgModuleDecoratorHandler`**: Handle their respective decorators.
### 4. Template Type Checking (`ngtsc/typecheck`)
- **`TemplateTypeChecker`**: Generates "Type Check Blocks" (TCBs). A TCB is a block of TypeScript code that represents the template's logic in a way `tsc` can understand and check for errors.
- **`TypeCheckBlock`**: The actual generated code that validates bindings, events, and structural directives.
### 5. Metadata & Scope (`ngtsc/metadata`, `ngtsc/scope`)
- **`MetadataReader`**: Reads Angular metadata from source files (using `LocalMetadataRegistry`) and `.d.ts` files (using `DtsMetadataReader`).
- **`ScopeRegistry`**: Determines the "compilation scope" of a component (which directives/pipes are available to it), handling `NgModule` transitive exports and Standalone Component imports.
### 6. Emit & Transformation (`ngtsc/transform`)
- **`ivyTransformFactory`**: A TypeScript transformer factory.
- **`IvyCompilationVisitor`**: Visits classes, triggers compilation via `TraitCompiler`, and collects the Output AST.
- **`IvyTransformationVisitor`**: Translates the Output AST into TypeScript AST, injects the `static ɵ...` fields, and removes the original decorators.
## Compilation Phases
1. **Construction**: `NgtscProgram` creates `NgCompiler`, which sets up all registries and the `TraitCompiler`.
2. **Analysis** (`analyzeSync`):
- The `TraitCompiler` scans files.
- `DecoratorHandler`s extract metadata and parse templates.
- No cross-file resolution happens here (allowing for parallelism and caching).
3. **Resolution** (`resolve`):
- `TraitCompiler` resolves traits.
- Components link their templates to specific Directives and Pipes (found via `ScopeRegistry`).
- Import cycles are detected and handled (e.g., via "remote scoping").
4. **Type Checking**:
- `TemplateTypeChecker` creates TCBs for all components.
- TypeScript diagnostics are retrieved for these TCBs.
5. **Emit** (`prepareEmit`):
- `ivyTransformFactory` is created.
- TS `emit` is called.
- The transformers run, injecting the compiled Ivy instructions into the JS/DTS output.
## Important File Locations
- `packages/compiler-cli/src/ngtsc/program.ts`: Entry point (`NgtscProgram`).
- `packages/compiler-cli/src/ngtsc/core/src/compiler.ts`: Core logic (`NgCompiler`).
- `packages/compiler-cli/src/ngtsc/transform/src/trait.ts`: Trait state machine.
- `packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts`: Component compilation logic.
- `packages/compiler-cli/src/ngtsc/typecheck/src/template_type_checker.ts`: Type checking logic.
- `packages/compiler-cli/src/ngtsc/transform/src/transform.ts`: AST transformation logic.
+96
View File
@@ -0,0 +1,96 @@
---
name: reference-core
description: Explains the mental model and architecture of the code under `packages/core`. You MUST use this skill any time you plan to work with code in `packages/core`
---
# Angular Core (`packages/core`) Mental Model
This document outlines the architecture and mental model for `packages/core`, the heart of the Angular framework.
## 1. High-Level Architecture
`packages/core` contains the runtime logic for Angular. Its primary responsibilities are:
1. **Rendering (Ivy/Render3)**: Transforming templates into DOM updates.
2. **Dependency Injection (DI)**: Managing object creation and lifetime.
3. **Change Detection**: Synchronizing the model with the view.
4. **Reactivity**: Signals and Zone.js integration.
## 2. Rendering Engine (Ivy / Render3)
The rendering engine (located in `packages/core/src/render3`) uses an **instruction-based** approach.
### Key Concepts
- **Instructions**: The Angular compiler transforms templates into a sequence of instruction calls (e.g., `ɵɵelementStart`, `ɵɵtext`, `ɵɵproperty`). These instructions are executed at runtime to create and update the view.
- _Location_: `packages/core/src/render3/instructions`
- **LView (Logical View)**: An array containing the _state_ of a specific view instance. It holds:
- DOM nodes (`RElement`, `RText`).
- Binding values (for change detection).
- Directive/Component instances.
- _Context_: `packages/core/src/render3/interfaces/view.ts`
- **TView (Template View)**: An array containing the _static structure_ of a view. It is shared across all instances (`LView`s) of the same component/template. It holds:
- Property names for bindings.
- Node relationship information.
- Compiled directive definitions.
- _Context_: `packages/core/src/render3/interfaces/view.ts`
- **Memory Layout**: `LView` and `TView` are parallel arrays. Index `i` in `LView` corresponds to metadata at index `i` in `TView`.
- `HEADER`: Fixed size, contains context (Parent, Host, etc.).
- `DECLS`: Static nodes (elements, text, pipes).
- `VARS`: Binding values.
- `EXPANDO`: Dynamic data (host bindings, injectors).
### The Render Cycle
1. **Creation Mode**: Instructions create DOM nodes and store them in `LView`.
2. **Update Mode**: Instructions check current values against previous values stored in `LView`. If changed, they update the DOM.
## 3. Dependency Injection (DI)
DI in Angular is hierarchical and split into two systems that interact:
### Module Injector (`R3Injector`)
- Configured via `@NgModule.providers` or `providedIn: 'root'`.
- Stored in a hierarchy of `R3Injector` instances.
- _Location_: `packages/core/src/di/r3_injector.ts`
### Node Injector
- Configured via `@Component.providers` or `@Directive.providers`.
- **Not a class**, but a data structure embedded in the `LView` ("Expando" section).
- Uses **Bloom Filters** (`TView.data`) to quickly check if a token is present at a specific node index before traversing up the tree.
- Resolves tokens starting from the current node, walking up the view tree (Element Injector hierarchy), and falling back to the Module Injector if not found.
## 4. Change Detection
- **Dirty Checking**: Angular checks if values bound in templates have changed.
- **Strategies**:
- `Default`: Checks everything.
- `OnPush`: Checks only if inputs change, events fire, or signals update.
- **Signals**: The new reactivity primitive. Signals notify the scheduler when they change, potentially allowing for fine-grained updates (Zoneless).
## 5. Key Directories to Know
- `src/render3`: The Ivy rendering engine.
- `instructions`: The runtime instructions called by compiled code.
- `interfaces`: `LView`, `TView`, `TNode` definitions.
- `src/di`: Dependency injection system.
- `src/change_detection`: Change detection logic.
- `src/zone`: Zone.js integration.
- `src/signal`: Signals implementation (if present in this version, otherwise likely in `primitives`).
## 6. Conventions & Gotchas
- **Prefixes**: Private/Internal exports often start with `ɵ`.
- **Global State**: Ivy relies heavily on global state (e.g., `getLView()`) during instruction execution to avoid passing context arguments everywhere. This is for performance and code size.
- **Performance**: The code is highly optimized for performance and memory. You will see arrays used instead of objects, bitmasks, and manual memory management patterns. **Respect these patterns.**
## 7. How to Modify Core
1. **Understand the Instruction**: If modifying runtime behavior, find the corresponding instruction in `src/render3/instructions`.
2. **Check `LView`/`TView` Impact**: If adding state, understand where it fits in the `LView` array.
3. **Tests**: Core has extensive tests. Run them using Bazel.
@@ -0,0 +1,104 @@
---
name: reference-signal-forms
description: Explains the mental model and architecture of the code under `packages/forms/signals`. You MUST use this skill any time you plan to work with code in `packages/forms/signals`
---
# Signal Forms Architecture
The `packages/forms/signals` directory contains an experimental, signal-based forms API for Angular.
This system differs significantly from the existing Reactive and Template-driven forms.
## Mental Model
1. **Model-Driven**: The system is built around a `WritableSignal<T>` which serves as the **single source of truth**.
Unlike Reactive Forms where the `FormControl` holds the value, here the `Signal` holds the value.
The form is merely a _view_ or _projection_ of that signal, adding form-specific state (validity, dirty, touched).
2. **Proxy-Based Traversal**: The form API (`form(signal)`) returns a `FieldTree`. This object is a **Proxy**.
It allows accessing nested fields (e.g., `myForm.user.name`) without manually creating control groups.
Accessing a property on the proxy lazily resolves or creates the corresponding `FieldNode`.
3. **Schema-Based Logic**: Validation, disabled state, and other metadata are defined separately via **Schemas**.
Schemas are applied to the form structure using functions like `apply`, `applyEach` (for arrays), and `applyWhen`.
This separates the _structure_ of the data from the _rules_ governing it.
4. **Directives as Glue**: The `[formField]` directive binds a DOM element (native input or custom control) to a `FieldNode`.
It handles:
- Syncing the value between the DOM and the Signal.
- Reflecting state (valid, touched, etc.) to the UI.
- Handling user interaction events (blur, input).
## Key Components
### 1. `FieldNode` (`src/field/node.ts`)
The central internal class representing a single field in the form graph. It aggregates several state managers:
- `structure`: Manages parent/child relationships and signal slicing.
- `validationState`: Computes `valid`, `invalid`, `errors` signals.
- `nodeState`: Tracks `touched`, `dirty`, `pristine`.
- `metadataState`: Stores metadata like `min`, `max`, `required`.
- `submitState`: Tracks submission status and server errors.
### 2. `ValidationState` (`src/field/validation.ts`)
Manages the complexity of validation:
- **Synchronous Errors**: Derived from schema rules.
- **Asynchronous Errors**: Handled via signals, including 'pending' states.
- **Tree Errors**: Errors that bubble up or are targeted at specific fields.
- **Submission Errors**: Server-side errors injected imperatively via `submit()`.
### 3. `FormField` Directive (`src/directive/form_field_directive.ts`)
The bridge between the `FieldNode` and the DOM.
- Selector: `[formField]`
- It supports:
- **Native Elements**: `<input>`, `<select>`, `<textarea>`.
- **Custom Controls**: Components implementing `FormUiControl` or `FormValueControl`.
- **Legacy Interop**: Components implementing `ControlValueAccessor` (via `InteropNgControl`).
### 4. `Schema` (`src/api/structure.ts` & `src/api/rules`)
Defines the behavior.
- Created via `schema(fn)`.
- Applied via `apply(path, schema)`.
- Rules include validators (`required`, `pattern`, `min`, `max`) and state modifiers (`disabled`, `hidden`).
## Data Flow
1. **Read**: `form.field.value()` reads directly from the underlying signal (projected to the specific path).
2. **Write**: Writing to the form (e.g., via UI) updates the underlying signal.
3. **Validation**: A computed effect observes the value signal and runs validators defined in the schema.
## Usage Example (Conceptual)
```typescript
// 1. Define Model
const user = signal({name: '', age: 0});
// 2. Define Schema
const userRules = schema((u) => {
required(u.name);
min(u.age, 18);
});
// 3. Create Form
const userForm = form(user, userRules); // OR apply(userForm, userRules)
// 4. Bind in Template
// <input [formField]="userForm.name">
```
## Important Files
- `packages/forms/signals/src/api/structure.ts`: Public API entry points (`form`, `apply`).
- `packages/forms/signals/src/api/control.ts`: Interfaces for custom controls (`FormUiControl`).
- `packages/forms/signals/src/field/node.ts`: The `FieldNode` implementation.
- `packages/forms/signals/src/directive/form_field_directive.ts`: The `[formField]` directive.
## Supplemental Information
- [Compiler & Core Integration](references/integration.md): Details how `[formField]` hooks into type-checking and the runtime.
@@ -0,0 +1,46 @@
# Signal Forms Integration: Compiler & Core
This document explains how the Signal Forms system hooks into the Angular compiler and runtime to provide seamless type-checking and efficient updates.
## 1. Compiler-CLI Integration (Type Checking)
The `packages/compiler-cli` package contains specific logic to support `[formField]`. This is primarily handled in `src/ngtsc/typecheck/src/ops/signal_forms.ts`.
### Key Mechanisms:
- **Detection**: The compiler identifies a directive as a "Field Directive" if it has the `ɵNgFieldDirective` property or comes from `@angular/forms/signals`.
- **Synthetic Binding Expansion**: When you write `<input [formField]="mySignal" />`, the type checker doesn't just check `formField`. It synthetically expands this into a set of bindings for validation:
- `[value]="mySignal()"` (or `checked` for checkboxes)
- `[disabled]="mySignal.disabled()"`
- `[required]="mySignal.required()"`
- ...and so on.
- This ensures that `mySignal` (the `FieldNode`) has all the necessary properties to drive the form control.
- **Conflict Detection**: It actively prevents "double binding". If you bind `[formField]`, you are _banned_ from also binding `[value]`, `[disabled]`, `[required]`, etc., as the signal form should be the single source of truth.
- **Element Type Validation**:
- **Native Elements**: Checks that the signal's value type matches the element type (e.g., `<input type="checkbox">` requires a `boolean` signal).
- **Custom Controls**: Detects if a custom component is a "Form Value Control" (has a `value` input/output) or "Form Checkbox Control" (has a `checked` input/output) and validates against that.
### Relevant Files:
- `packages/compiler-cli/src/ngtsc/typecheck/src/ops/signal_forms.ts`: The core logic for `TcbNativeFieldOp` and `SignalFormFieldOp`.
## 2. Core Runtime Integration
The `packages/core` package provides the low-level instructions that power the `FormField` directive. This allows it to do things normal directives cannot, like efficiently syncing state without change detection overhead for every property.
### Key Mechanisms:
- **`ɵngControlCreate` Hook**: The `FormField` directive defines a special method `ɵngControlCreate`.
- **`ɵɵcontrol` Instructions**: When the compiler sees `ɵngControlCreate`, it emits:
- `ɵɵcontrolCreate`: Called during the creation phase.
- `ɵɵcontrol`: Called during the update phase.
- **`ControlDirectiveHost`**: These instructions provide the directive with a `ControlDirectiveHost`. This is a privileged interface that allows the `FormField` directive to:
- **Access the Element**: Get direct access to the native element or component instance.
- **Set Inputs**: Write directly to inputs of _other directives_ on the same node (e.g., setting the `value` input of a custom control).
- **Listen to Outputs**: Subscribe to outputs of other directives (e.g., `valueChange`).
- **Bypass Templates**: It effectively acts as a "meta-directive" that manages the bindings for you, bypassing the need for explicit template syntax for every property.
### Relevant Files:
- `packages/core/src/render3/instructions/control.ts`: Implementation of `ɵɵcontrol` instructions.
- `packages/forms/signals/src/directive/form_field_directive.ts`: The directive that implements the hook.
+56
View File
@@ -0,0 +1,56 @@
---
description: Find and fix flaky tests in the repository
---
Investigate flaky tests in the repo and propose fixes to improve stability.
High-level process:
1. Run tests in the repo to look for flakes.
- Consider using Bazel's `--runs_per_test` flag to easily find
flakes.
- Be cognizant of not exhausting all the resources on the current
machine, run a subset of tests at a time such as
`bazel test //packages/core/...`.
2. Once you find some flakes, focus on one at a time.
3. Create a new branch named `flakes/${relevantNameFromTest}`.
4. Reproduce the flake to the best of your ability.
- Consider using `--test_env JASMINE_RANDOM_SEED=1234` to
replicate the broken test ordering.
5. Debug the test to understand the failure mode.
- Consider temporarily disabling / skipping other tests with `xit`
and `fit` to narrow down where the flake might be coming from if
multiple tests are influencing each other.
- Consider temporarily ignoring Firefox tests with
`--test_tag_filters -firefox` if the flake does not appear to be
browser specific.
- Consider using `--test_sharding_strategy disabled` to run the
test in a single shard.
- Try to understand why the test was _flaky_, not just why it
_failed_. Understanding the inconsistency is important to
finding the correct fix.
6. Attempt a fix and validate with `--runs_per_test`.
- Iterate on the fix until you have something which appears to
work.
- If you find yourself stuck and not making meaningful progress,
note down what you've learned/where you're struggling, commit
what you have, look for another flake to fix, and continue. At
the end, surface to the user what you failed to fix.
- Don't try to make significant changes to Angular's runtime
behavior, focus just on making the test pass/fail consistently.
7. Commit the change with relevant details in the commit message and
move on to the next test.
- Be sure to include your theory of why the test was flaky and
how this fix eliminates or reduces that flakiness.
8. Iterate as many times as the user requests you to (default 5
branches if not otherwise specified).
9. Once you can't find any flaky tests or have iterated as many times
as requested, stop and inform the user what you found and fixed.
Additional notes:
- Multiple fixes including the same/related files can go in the same
commit or multiple commits on the same branch.
- Distinct test fixes should go in different branches, make a new one
for each investigation.
- You may push these branches to `origin`, but do not create PRs for
them.
-76
View File
@@ -1,76 +0,0 @@
# Bazel does not yet support wildcards or other .gitignore semantics for
# .bazelignore. Two issues for this feature request are outstanding:
# https://github.com/bazelbuild/bazel/issues/7093
# https://github.com/bazelbuild/bazel/issues/8106
.git
node_modules
dist/
# All integration test node_modules folders
integration/animations/node_modules
integration/animations-async/node_modules
integration/cli-elements-universal/node_modules
integration/cli-hello-world/node_modules
integration/cli-hello-world-ivy-i18n/node_modules
integration/cli-hello-world-lazy/node_modules
integration/cli-hello-world-mocha/node_modules
integration/cli-signal-inputs/node_modules
integration/defer/node_modules
integration/dynamic-compiler/node_modules
integration/forms/node_modules
integration/injectable-def/node_modules
integration/ivy-i18n/node_modules
integration/ng_elements/node_modules
integration/ng_update/node_modules
integration/ng_update_migrations/node_modules
integration/ng-add-localize/node_modules
integration/no_ts_linker/node_modules
integration/nodenext_resolution/node_modules
integration/platform-server/node_modules
integration/platform-server-zoneless/node_modules
integration/platform-server-hydration/node_modules
integration/service-worker-schema/node_modules
integration/side-effects/node_modules
integration/standalone-bootstrap/node_modules
integration/terser/node_modules
integration/trusted-types/node_modules
integration/typings_test_rxjs7/node_modules
integration/legacy-animations/node_modules
integration/legacy-animations-async/node_modules
integration/typings_test_ts59/node_modules
modules/ssr-benchmarks/node_modules
vscode-ng-language-service/integration/project/dist/
# For rules_js
adev/node_modules
adev/shared-docs/node_modules
adev/shared-docs/pipeline/api-gen/node_modules
modules/node_modules
integration/node_modules
packages/animations/node_modules
packages/common/node_modules
packages/localize/node_modules
packages/compiler-cli/node_modules
packages/compiler-cli/linker/babel/test/node_modules
packages/compiler/node_modules
packages/core/node_modules
packages/core/test/bundling/node_modules
packages/elements/node_modules
packages/forms/node_modules
packages/language-service/node_modules
packages/platform-browser/node_modules
packages/platform-server/node_modules
packages/platform-browser-dynamic/node_modules
packages/router/node_modules
packages/zone.js/node_modules
packages/zone.js/test/typings/node_modules
packages/upgrade/node_modules
packages/benchpress/node_modules
packages/service-worker/node_modules
packages/zone.js/test/typings/node_modules
packages/zone.js/node_modules
tools/bazel/rules_angular_store/node_modules
vscode-ng-language-service/node_modules
vscode-ng-language-service/server/node_modules
vscode-ng-language-service/integration/pre_standalone_project/node_modules
vscode-ng-language-service/integration/project/node_modules
+4 -1
View File
@@ -1,3 +1,6 @@
# Disable NG CLI TTY mode
build --action_env=NG_FORCE_TTY=false
# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results --strategy=TestRunner=standalone
@@ -143,7 +146,7 @@ build:trusted-build --remote_upload_local_results=true
# Ensure that tags like "no-remote-exec" get propagated to actions created by rules,
# even if the rule implementation does not explicitly pass them to the execution requirements.
# https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
common --experimental_allow_tags_propagation
common --incompatible_allow_tags_propagation
# Disable network access in the sandbox by default. To enable network access
# for a particular target, use:
+1 -1
View File
@@ -1 +1 @@
7.6.2
8.6.0
+2 -2
View File
@@ -3,11 +3,11 @@
This folder contains configuration files that can be used to opt into working on this repository in a [Docker container](https://www.docker.com/resources/what-container) via [VSCode](https://code.visualstudio.com/)'s Remote Development feature (see below).
Info on remote development and developing inside a container with VSCode:
- [VSCode: Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)
- [VSCode: Developing inside a Container](https://code.visualstudio.com/docs/remote/containers)
- [VSCode: Remote Development FAQ](https://code.visualstudio.com/docs/remote/faq)
## Usage
_Prerequisite: [Install Docker](https://docs.docker.com/install) on your local environment._
@@ -15,6 +15,7 @@ _Prerequisite: [Install Docker](https://docs.docker.com/install) on your local e
To get started, read and follow the instructions in [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers). The [.devcontainer/](.) directory contains pre-configured `devcontainer.json` and `Dockerfile` files, which you can use to set up remote development with a docker container.
In a nutshell, you need to:
- Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.
- Copy [recommended-Dockerfile](./recommended-Dockerfile) to `Dockerfile` (and optionally tweak to suit your needs).
- Copy [recommended-devcontainer.json](./recommended-devcontainer.json) to `devcontainer.json` (and optionally tweak to suit your needs).
@@ -23,7 +24,6 @@ In a nutshell, you need to:
The `.devcontainer/devcontainer.json` and `.devcontainer/Dockerfile` files are ignored by git, so you can have your own local versions. We may occasionally update the template files ([recommended-devcontainer.json](./recommended-devcontainer.json), [recommended-Dockerfile](./recommended-Dockerfile)), in which case you will need to manually update your local copies (if desired).
## Updating `recommended-devcontainer.json` and `recommended-Dockerfile`
You can update and commit the recommended config files (which people use as basis for their local configs), if you find that something is broken, out-of-date or can be improved.
+5 -12
View File
@@ -1,23 +1,16 @@
# Image metadata and config.
# Ideally, the Node.js version should match what we use on CI.
FROM cimg/node:18.13.0@sha256:45d0ee279f522c4562a464df71108104cc9b2187205333ffd0707d4f05589731
FROM cimg/node:22.21.1-browsers@sha256:eee8ed828d5a54196456a86ac6872c43325acad54e59632261e23b486c458992
LABEL name="Angular dev environment" \
description="This image can be used to create a dev environment for building Angular." \
vendor="angular" \
version="1.0"
EXPOSE 4000 4200 4433 5000 8080 9876
description="This image can be used to create a dev environment for building Angular." \
vendor="angular" \
version="1.0"
EXPOSE 4200 4201 4205 4206 9876
# Switch to `root`.
USER root
# Configure `Node.js`/`npm`.
RUN npm config --global set user root
# Go! (And keep going.)
CMD ["tail", "--follow", "/dev/null"]
+6 -5
View File
@@ -2,10 +2,11 @@
{
"name": "Angular dev container",
"dockerFile": "Dockerfile",
"appPort": [4000, 4200, 4433, 5000, 8080, 9876],
"forwardPorts": [4200, 4201, 4205, 4206, 9876],
"postCreateCommand": "pnpm install",
"extensions": [
"devondcarew.bazel-code",
"ms-vscode.vscode-typescript-tslint-plugin"
],
"customizations": {
"vscode": {
"extensions": ["BazelBuild.vscode-bazel", "ms-vscode.vscode-typescript-tslint-plugin"]
}
}
}
+70
View File
@@ -0,0 +1,70 @@
description = "Researches part of the codebase and creates a skill for it"
prompt="""
## Role
You are an experienced senior developer specializing in reverse engineering and understanding
complex code, prompt engineering, and context engineering.
Your task is to build a complete understanding of the mental model and architecture of the code,
and to create an efficient context file that allows a coding agent to understand and work with the
code.
## Guiding Principles
1. **Deep Analysis:** Understand the _why_ behind the code. Not just a surface level listing of
files and classes.
2. **Curiosity:** Be curious. If something is unclear, confusing, or unexpected you _MUST_
investigate further until you fully understand.
3. **Efficient Token Use:** The final output will be directly included into the context of the
coding assistant, so be sure to make efficient use of tokens. Think deeply, but only capture the
most important information for the coding agent in the final output
## Procedure
1. Fully explore the code before first, with a focus on understanding the architecture and how all
of the pieces fit together.
2. Develop an understanding of the mental model behind the architecture. _Why_ is the code is
architected this way? How should developers think about the system?
3. Document your findings using the given output format described in the next section.
## Output Format
Note the following placeholders below:
- `[package]`: is a unique identifier for the current code package (for example if you're looking at
code under `packages/forms/signals` you might use `signal-forms` as the `[package]`)
- `[code-location]`: is the location of the current code within the larger repository
- `[context]`: is the context to add to the coding agent when it is working with this code.
With those placeholders in mind, write a file create a new directory under `.gemini/skills` with the
name `reference-[package]/`, and under that directory add a `SKILL.md` file with the following
content:
```md
---
name: reference-[package]
description: Explains the mental model and architecture of the code under `[code-location]`. You MUST use this skill any time you plan to work with code in `[code-location]`
---
[context]
```
## Additional User Instructions
The user may have additional instructions.
- The user should indicate what package to research
- The user may indicate that they want to update a package that has already been researched. In this
case, read the existing skill and make any required updates based on your research
- The user may request supplemental information be added to the skill (if so, add this to the
existing skill in a new markdown file under a `references` directory within the skill. Add a
section to the main `SKILL.md` that mentions what supplemental information is available)
Here are the user's additional instructions:
{{args}}
"""
+2 -1
View File
@@ -7,4 +7,5 @@ code_review:
help: false
summary: false
code_review: false
ignore_patterns: []
ignore_patterns:
- pnpm-lock.yaml
+5
View File
@@ -0,0 +1,5 @@
{
"context": {
"fileName": ["AGENTS.md", "GEMINI.md"]
}
}
+2
View File
@@ -19,6 +19,8 @@ cc34e5fb072e7903e01463953a19d18503a39347
f9781f9804f1e7c84df356d9aeb267730a7fc499
dc62446ef7f2898a20d3be1196ecaf2a92a1077d
711cb416260ca11ff158fc39b372efa2cf022d36
af77b89e2abb67bba201a53d500874ad572b8384
6270bba056cfaadb3fe0b2bf3b17036bdc28b90e
# commits that switch to relative imports
3d2263cb1f208e561692e41c5a17196c3c57877f
ae047c59c0041e0a43cec020520d40ccd981b444
+48
View File
@@ -0,0 +1,48 @@
name: 'VSCode Angular Language Service extension'
description: Report an issue or suggest a feature for the VSCode Angular Language Service extension
body:
- type: checkboxes
id: bug-report-or-feature-request
attributes:
label: Is this a bug report or a feature request?
description: Select one.
options:
- label: Bug Report
- label: Feature Request
- type: textarea
id: reproduction-steps
attributes:
label: Please provide the steps to reproduce the issue [Bug Report only]
- type: textarea
id: expected-vs-actual-behavior
attributes:
label: Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]
- type: textarea
id: screenshot
attributes:
label: Please provide a screenshot if possible [Bug Report only]
- type: textarea
id: exception-or-error
attributes:
label: Please provide the exception or error you saw [Bug Report only]
render: true
- type: textarea
id: description
attributes:
label: Description [Feature Request only]
- type: textarea
id: proposed-solution
attributes:
label: Proposed solution [Feature Request only]
- type: textarea
id: alternatives-considered
attributes:
label: Alternatives considered [Feature Request only]
+3 -6
View File
@@ -1,12 +1,13 @@
## PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
## PR Type
What kind of change does this PR introduce?
<!-- Please check the one that applies to this PR using "x". -->
@@ -21,23 +22,19 @@ What kind of change does this PR introduce?
- [ ] angular.dev application / infrastructure changes
- [ ] Other... Please describe:
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Issue Number: N/A
## What is the new behavior?
## Does this PR introduce a breaking change?
- [ ] Yes
- [ ] No
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
## Other information
+14 -14
View File
@@ -1,4 +1,4 @@
import {cp, mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
import {mkdtemp, readFile, rm, writeFile} from 'node:fs/promises';
import {Deployment} from './deployments.mjs';
import {join} from 'node:path';
@@ -9,7 +9,7 @@ import {getCredentialFilePath} from './credential.mjs';
export async function deployToFirebase(
deployment: Deployment,
configPath: string,
distDirPath: string,
stagingDir: string,
) {
if (deployment.destination == undefined) {
console.log(`No deployment necessary for docs created from: ${deployment.branch}`);
@@ -18,37 +18,33 @@ export async function deployToFirebase(
console.log('Preparing for deployment to firebase...');
const tmpDeployDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
const deployConfigPath = join(tmpDeployDir, 'firebase.json');
const deployConfigPath = join(stagingDir, 'firebase.json');
const config = JSON.parse(await readFile(configPath, {encoding: 'utf-8'})) as {
hosting: {public: string};
};
config['hosting']['public'] = './dist';
config['hosting']['public'] = './browser';
await writeFile(deployConfigPath, JSON.stringify(config, null, 2));
await cp(distDirPath, join(tmpDeployDir, 'dist'), {recursive: true});
spawnSync(`chmod 777 -R ${tmpDeployDir}`, {encoding: 'utf-8', shell: true});
firebase(
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
tmpDeployDir,
stagingDir,
);
firebase(
`target:apply --config ${deployConfigPath} --project angular-dev-site hosting angular-docs ${deployment.destination}`,
tmpDeployDir,
stagingDir,
);
firebase(
`deploy --config ${deployConfigPath} --project angular-dev-site --only hosting --non-interactive`,
tmpDeployDir,
stagingDir,
);
firebase(
`target:clear --config ${deployConfigPath} --project angular-dev-site hosting angular-docs`,
tmpDeployDir,
stagingDir,
);
await rm(tmpDeployDir, {recursive: true});
await rm(stagingDir, {recursive: true});
}
export async function setupRedirect(deployment: Deployment) {
@@ -103,7 +99,7 @@ export async function setupRedirect(deployment: Deployment) {
}
function firebase(cmd: string, cwd?: string) {
spawnSync('npx', `-y firebase-tools@13.15.1 ${cmd}`.split(' '), {
const {status} = spawnSync('npx', `-y firebase-tools@13.15.1 ${cmd}`.split(' '), {
cwd,
encoding: 'utf-8',
shell: true,
@@ -113,4 +109,8 @@ function firebase(cmd: string, cwd?: string) {
GOOGLE_APPLICATION_CREDENTIALS: getCredentialFilePath(),
},
});
if (status !== 0) {
console.error('Firebase command failed, see log above for details.');
process.exit(status);
}
}
@@ -9,6 +9,7 @@ export interface Deployment {
to: string;
};
destination?: string;
servingUrl: string;
}
export type Deployments = Map<string, Deployment>;
@@ -31,6 +32,7 @@ export async function getDeployments(): Promise<Deployments> {
docSites.set(branch.name, {
branch: branch.name,
destination: `v${branch.version.major}-angular-dev`,
servingUrl: `https://v${branch.version.major}.angular.dev/`,
});
});
@@ -40,12 +42,14 @@ export async function getDeployments(): Promise<Deployments> {
from: `v${releaseTrains.latest.version.major}-angular-dev`,
to: 'https://angular.dev',
},
servingUrl: 'https://angular.dev/',
destination: 'angular-dev-site',
});
if (releaseTrains.releaseCandidate) {
docSites.set(releaseTrains.next.branchName, {
branch: releaseTrains.next.branchName,
servingUrl: 'https://next.angular.dev/',
});
docSites.set(releaseTrains.releaseCandidate.branchName, {
@@ -55,11 +59,13 @@ export async function getDeployments(): Promise<Deployments> {
from: `v${releaseTrains.releaseCandidate.version.major}-angular-dev`,
to: 'https://next.angular.dev',
},
servingUrl: 'https://next.angular.dev/',
});
} else {
docSites.set(releaseTrains.next.branchName, {
branch: releaseTrains.next.branchName,
destination: 'next-angular-dev',
servingUrl: 'https://next.angular.dev/',
});
}
+14 -10
View File
@@ -2,19 +2,18 @@ import {getInput, setFailed} from '@actions/core';
import {context} from '@actions/github';
import {deployToFirebase, setupRedirect} from './deploy.mjs';
import {getDeployments} from './deployments.mjs';
import {AuthenticatedGitClient, GithubConfig, setConfig} from '@angular/ng-dev';
import {generateSitemap} from './sitemap.mjs';
import {assertValidGithubConfig, AuthenticatedGitClient, getConfig} from '@angular/ng-dev';
import {githubReleaseTrainReadToken} from './credential.mjs';
import {spawnSync} from 'child_process';
import {cp, mkdtemp} from 'fs/promises';
import {tmpdir} from 'os';
import {join} from 'path';
const refMatcher = /refs\/heads\/(.*)/;
async function deployDocs() {
setConfig({
github: {
mainBranchName: 'main',
name: 'angular',
owner: 'angular',
} as GithubConfig,
});
getConfig([assertValidGithubConfig]);
AuthenticatedGitClient.configure(githubReleaseTrainReadToken);
@@ -28,7 +27,11 @@ async function deployDocs() {
const currentBranch = matchedRef[1];
const configPath = getInput('configPath');
const distDir = getInput('distDir');
const stagingDir = await mkdtemp(join(tmpdir(), 'deploy-directory'));
// Copy all files from the distDir into stagingDir and modify the permissions for editing
await cp(getInput('distDir'), stagingDir, {recursive: true});
spawnSync(`chmod 777 -R ${stagingDir}`, {encoding: 'utf-8', shell: true});
const deployment = (await getDeployments()).get(currentBranch);
if (deployment === undefined) {
@@ -57,7 +60,8 @@ async function deployDocs() {
console.log(` To: ${deployment.redirect.to}`);
}
await deployToFirebase(deployment, configPath, distDir);
await generateSitemap(deployment, stagingDir);
await deployToFirebase(deployment, configPath, stagingDir);
await setupRedirect(deployment);
}
@@ -0,0 +1,53 @@
import {Deployment} from './deployments.mjs';
import {join} from 'node:path';
import {readFile, writeFile} from 'node:fs/promises';
export async function generateSitemap(deployment: Deployment, distDir: string): Promise<void> {
/** Timestamp string used to of the last file update. */
const lastModifiedTimestamp = new Date().toISOString();
/** An object containing all of the routes available within the application. */
const {routes} = JSON.parse(await readFile(join(distDir, 'prerendered-routes.json'), 'utf-8'));
const routePaths = Object.keys(routes);
/** The generated sitemap string. */
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${routePaths
.map(
(route) => `<url>
<loc>${joinUrlParts(deployment.servingUrl, route)}</loc>
<lastmod>${lastModifiedTimestamp}</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>`,
)
.join('')}
</urlset>`;
await writeFile(join(distDir, 'browser', 'sitemap.xml'), sitemap, 'utf-8');
console.log(`Generated sitemap with ${routePaths.length} entries.`);
}
function joinUrlParts(...parts: string[]): string {
const normalizeParts: string[] = [];
for (const part of parts) {
if (part === '') {
// Skip any empty parts
continue;
}
let normalizedPart = part;
if (part[0] === '/') {
normalizedPart = normalizedPart.slice(1);
}
if (part.at(-1) === '/') {
normalizedPart = normalizedPart.slice(0, -1);
}
if (normalizedPart !== '') {
normalizeParts.push(normalizedPart);
}
}
return normalizeParts.join('/');
}
File diff suppressed because one or more lines are too long
@@ -2,6 +2,7 @@
"compilerOptions": {
"module": "NodeNext",
"target": "ES2021",
"types": ["node"],
"lib": ["es2021"],
"experimentalDecorators": true,
"strict": true,
@@ -11,6 +12,5 @@
"noImplicitReturns": true,
"declaration": true,
"sourceMap": true
}
}
+2 -2
View File
@@ -5,9 +5,9 @@ runs:
using: 'composite'
steps:
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/saucelabs@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Starting Saucelabs tunnel service
shell: bash
run: ./tools/saucelabs/sauce-service.sh run &
+6 -5
View File
@@ -21,16 +21,17 @@ jobs:
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'adev: preview'))
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Build adev
run: pnpm bazel build //adev:build.production
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
# `snapshot-build` config is used to stamp the exact version with sha in the footer.
run: pnpm bazel build //adev:build.production --config=snapshot-build
- uses: angular/dev-infra/github-actions/previews/pack-and-upload-artifact@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
workflow-artifact-name: 'adev-preview'
pull-number: '${{github.event.pull_request.number}}'
+6 -4
View File
@@ -29,18 +29,20 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
token: '${{secrets.GITHUB_TOKEN}}'
persist-credentials: false
- name: Configure Firebase deploy target
working-directory: ./
run: |
# We can use `npx` as the Firebase deploy actions uses it too.
npx -y firebase-tools@latest target:clear --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs
npx -y firebase-tools@latest target:apply --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs ${{env.PREVIEW_SITE}}
# Use stable version release
npx -y firebase-tools@15.15.0 target:clear --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs
npx -y firebase-tools@15.15.0 target:apply --config adev/firebase.json --project ${{env.PREVIEW_PROJECT}} hosting angular-docs ${{env.PREVIEW_SITE}}
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
- uses: angular/dev-infra/github-actions/previews/upload-artifacts-to-firebase@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
github-token: '${{secrets.GITHUB_TOKEN}}'
workflow-artifact-name: 'adev-preview'
@@ -12,10 +12,11 @@ permissions:
jobs:
assistant_to_the_branch_manager:
runs-on: ubuntu-latest
if: github.event.repository.fork == false
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: angular/dev-infra/github-actions/branch-manager@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
- uses: angular/dev-infra/github-actions/branch-manager@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+6 -5
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/benchmark-compare ')}}
steps:
- uses: TheModdingInquisition/actions-team-membership@a69636a92bc927f32c3910baac06bacc949c984c # v1.0
- uses: TheModdingInquisition/actions-team-membership@057d91bb80f2976a1bc6dfab5b4ae1da9aebbd89 # v1.0
with:
team: 'team'
organization: angular
@@ -28,17 +28,17 @@ jobs:
- uses: alessbell/pull-request-comment-branch@aad01d65d6982b8eacabed5e9a684cd8ceb98da6 # v1.1
id: comment-branch
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# Specify repository as the PR branch might be from a fork.
repository: ${{steps.comment-branch.outputs.head_owner}}/${{steps.comment-branch.outputs.head_repo}}
# Checkout the pull request and assume it being trusted given we've checked
# that the action was triggered by a team member.
ref: ${{steps.comment-branch.outputs.head_ref}}
ref: ${{steps.comment-branch.outputs.head_sha}}
- run: pnpm install --frozen-lockfile
- uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
- uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
bazelrc: ./.bazelrc.user
@@ -49,7 +49,8 @@ jobs:
COMMENT_BODY: ${{ github.event.comment.body }}
run: pnpm benchmarks prepare-for-github-action "$COMMENT_BODY"
- run: pnpm benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
- run: pnpm benchmarks run-compare ${{steps.info.outputs.compareSha}} "${{steps.info.outputs.benchmarkTarget}}"
id: benchmark
name: Running benchmark
+32 -39
View File
@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Check code lint
@@ -32,6 +32,8 @@ jobs:
run: pnpm ng-dev pullapprove verify
- name: Validate angular robot configuration
run: pnpm ng-dev ngbot verify
- name: Validate agent skills
run: pnpm ng-dev ai skills validate
- name: Confirm code builds with typescript as expected
run: pnpm check-tooling-setup
@@ -39,20 +41,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
disable-package-manager-cache: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Cache downloaded Cypress binary
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: '~/.cache/Cypress'
key: cypress-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run unit tests
@@ -60,7 +57,7 @@ jobs:
- name: Test build
run: pnpm devtools:build:chrome
- name: Cypress run
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
uses: cypress-io/github-action@783cb3f07983868532cabaedaa1e6c00ff4786a8 # v7.1.9
with:
command: pnpm devtools:test:e2e
start: pnpm bazel run //devtools/src:devserver
@@ -72,11 +69,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -88,11 +85,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -105,11 +102,11 @@ jobs:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -124,20 +121,15 @@ jobs:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Cache downloaded vscode binary
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: '~/.cache/vscode-test'
key: vscode-cache-${{ runner.os }}-${{ hashFiles('vscode-ng-language-service/integration/e2e/index.ts') }} # The version is specified in this file.
- name: Run tests
run: pnpm bazel test //vscode-ng-language-service/...
@@ -146,11 +138,11 @@ jobs:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- run: echo "https://${{secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN}}:@github.com" > ${HOME}/.git_credentials
@@ -162,11 +154,11 @@ jobs:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
google_credential: ${{ secrets.RBE_TRUSTED_BUILDS_USER }}
- name: Install node modules
@@ -216,23 +208,24 @@ jobs:
runs-on: ubuntu-latest-8core
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Build adev
run: pnpm bazel build //adev:build.production --config=release
# `snapshot-build` config is used to stamp the exact version with sha in the footer.
run: pnpm bazel build //adev:build.production --config=snapshot-build
- name: Deploy to firebase
uses: ./.github/actions/deploy-docs-site
with:
serviceKey: ${{ secrets.ANGULAR_DEV_SITE_DEPLOY }}
githubReleaseTrainReadToken: ${{ secrets.DOCS_DEPLOY_GITHUB_RELEASE_TRAIN_TOKEN }}
configPath: 'adev/firebase.json'
distDir: 'dist/bin/adev/dist/browser'
distDir: 'dist/bin/adev/dist'
- name: Update Algolia synonym record
run: pnpm tsx adev/scripts/synonyms/update-synonyms.mts
run: node adev/scripts/synonyms/update-synonyms.mts
env:
ALGOLIA_KEY: ${{ secrets.ALGOLIA_SYNONYM_MANAGER }}
@@ -0,0 +1,59 @@
name: Update ADEV Cross Repo Docs
on:
workflow_dispatch:
inputs: {}
push:
branches:
- 'main'
- '[0-9]+.[0-9]+.x'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
update_adev_cross_repo_docs:
name: Update Cross Repo ADEV Docs
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
# Prevents multiple concurrent runs of this workflow for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
- name: Generate Docs
run: node adev/scripts/update-cross-repo-docs/index.mjs
env:
ANGULAR_READONLY_GITHUB_TOKEN: ${{ secrets.READONLY_GITHUB_TOKEN }}
- name: Create a PR (if necessary)
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
push-to-fork: 'angular-robot/angular'
delete-branch: true
maintainer-can-modify: false
branch: docs-cross-repo-update-${{github.ref_name}}
committer: Angular Robot <angular-robot@google.com>
author: Angular Robot <angular-robot@google.com>
title: 'docs: update cross-repo adev docs [${{github.ref_name}}]'
body: |
Updated Angular adev cross repo docs files.
labels: |
action: merge
area: docs
target: automation
commit-message: |
docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
+18 -5
View File
@@ -3,23 +3,36 @@ name: DevInfra
on:
pull_request_target:
types: [opened, synchronize, reopened]
issues:
types: [opened, reopened]
# Declare default permissions as read only.
permissions:
contents: read
jobs:
labels:
pull_request_labels:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: angular/dev-infra/github-actions/pull-request-labeling@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: angular/dev-infra/github-actions/labeling/pull-request@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
labels: '{"requires: TGP": ["packages/core/primitives/**/{*,.*}"]}'
post_approval_changes:
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: angular/dev-infra/github-actions/post-approval-changes@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: angular/dev-infra/github-actions/post-approval-changes@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
issue_labels:
if: github.event_name == 'issues'
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/labeling/issue@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
google-generative-ai-key: ${{ secrets.GOOGLE_GENERATIVE_AI_KEY }}
+2 -2
View File
@@ -13,8 +13,8 @@ jobs:
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: angular/dev-infra/github-actions/google-internal-tests@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: angular/dev-infra/github-actions/google-internal-tests@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
run-tests-guide-url: http://go/angular-g3sync-start
github-token: ${{ secrets.GITHUB_TOKEN }}
+4 -4
View File
@@ -13,15 +13,15 @@ jobs:
JOBS: 2
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Saucelabs Variables
uses: angular/dev-infra/github-actions/saucelabs@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/saucelabs@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Set up Sauce Tunnel Daemon
run: pnpm bazel run //tools/saucelabs-daemon/background-service -- $JOBS &
env:
+1 -1
View File
@@ -9,6 +9,6 @@ jobs:
status:
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/unified-status-check@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
- uses: angular/dev-infra/github-actions/unified-status-check@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+3 -3
View File
@@ -21,7 +21,7 @@ jobs:
workflows: ${{ steps.workflows.outputs.workflows }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- id: workflows
@@ -36,9 +36,9 @@ jobs:
workflow: ${{ fromJSON(needs.list.outputs.workflows) }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
# We utilize the google-github-actions/auth action to allow us to get an active credential using workflow
+24 -32
View File
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Check code lint
@@ -32,12 +32,14 @@ jobs:
run: pnpm ng-dev ngbot verify
- name: Confirm code builds with typescript as expected
run: pnpm check-tooling-setup
- name: Validate agent skills
run: pnpm ng-dev ai skills validate
- name: Check commit message
run: pnpm ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
- name: Check code format
run: pnpm ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
- name: Check Package Licenses
uses: angular/dev-infra/github-actions/linting/licenses@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/linting/licenses@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
allow-dependencies-licenses: 'pkg:npm/google-protobuf@'
@@ -45,18 +47,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
with:
disable-package-manager-cache: true
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
- name: Cache downloaded Cypress binary
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: '~/.cache/Cypress'
key: cypress-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run unit tests
@@ -64,7 +61,7 @@ jobs:
- name: Test build
run: pnpm devtools:build:chrome
- name: Cypress run
uses: cypress-io/github-action@b8ba51a856ba5f4c15cf39007636d4ab04f23e3c # v6.10.2
uses: cypress-io/github-action@783cb3f07983868532cabaedaa1e6c00ff4786a8 # v7.1.9
with:
command: pnpm devtools:test:e2e
start: pnpm bazel run //devtools/src:devserver
@@ -76,11 +73,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run CI tests for framework
@@ -91,7 +88,7 @@ jobs:
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
- name: Upload GRPC logs (for debugging of RBE issues)
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
path: /tmp/rbe-grpc.log
retention-days: 1
@@ -100,11 +97,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel Remote Caching
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run integration CI tests for framework
@@ -115,11 +112,11 @@ jobs:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Run tests
@@ -132,18 +129,13 @@ jobs:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- name: Cache downloaded vscode binary
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: '~/.cache/vscode-test'
key: vscode-cache-${{ runner.os }}-${{ hashFiles('vscode-ng-language-service/integration/e2e/index.ts') }} # The version is specified in this file.
- name: Run tests
run: pnpm bazel test //vscode-ng-language-service/...
@@ -152,11 +144,11 @@ jobs:
labels: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@5c8f5f7c0a4e805a8ee33706ee2df99854396bbd
uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17
- name: Install node modules
run: pnpm install --frozen-lockfile
- run: |
+3 -3
View File
@@ -25,7 +25,7 @@ jobs:
steps:
- name: 'Checkout code'
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
@@ -39,7 +39,7 @@ jobs:
# Upload the results as artifacts.
- name: 'Upload artifact'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: SARIF file
path: results.sarif
@@ -47,6 +47,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
with:
sarif_file: results.sarif
@@ -1,89 +0,0 @@
name: Update ADEV Angular CDK APIs and CLI Help
on:
workflow_dispatch:
inputs: {}
push:
branches:
- 'main'
- '[0-9]+.[0-9]+.x'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
update_adev_docs:
name: Update Angular CDK APIs and CLI Help (if necessary)
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
# Prevents multiple concurrent runs of this workflow for the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout the repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
# Angular CDK
- name: Generate CDK apis
run: node adev/scripts/update-cdk-apis/index.mjs
env:
ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR CDK apis (if necessary)
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
push-to-fork: 'angular-robot/angular'
delete-branch: true
maintainer-can-modify: false
branch: docs-update-cdk-apis-${{github.ref_name}}
committer: Angular Robot <angular-robot@google.com>
author: Angular Robot <angular-robot@google.com>
title: 'docs: update Angular CDK apis [${{github.ref_name}}]'
body: |
Updated Angular CDK api files.
labels: |
action: merge
area: docs
target: automation
commit-message: |
docs: update Angular CDK apis
Updated Angular CDK api files.
# Angular CLI
- name: Reset to current GitHub ref
run: |
git reset --hard ${{ github.ref }}
- name: Generate CLI help
run: node adev/scripts/update-cli-help/index.mjs
env:
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR CLI help (if necessary)
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
push-to-fork: 'angular-robot/angular'
delete-branch: true
maintainer-can-modify: false
branch: docs-update-cli-help-${{github.ref_name}}
committer: Angular Robot <angular-robot@google.com>
author: Angular Robot <angular-robot@google.com>
title: 'docs: update Angular CLI help [${{github.ref_name}}]'
body: |
Updated Angular CLI help contents.
labels: |
action: merge
area: docs
target: automation
commit-message: |
docs: update Angular CLI help
Updated Angular CLI help contents.
+3
View File
@@ -54,3 +54,6 @@ baseline.json
# Ignore cache created with the Angular CLI.
.angular/
# pnpm store
.pnpm-store
+23
View File
@@ -0,0 +1,23 @@
/**
* The configuration for `ng-dev caretaker` commands.
*
* @type { import("@angular/ng-dev").CaretakerConfig }
*/
export const caretaker = {
g3SyncConfigPath: './.ng-dev/google-sync-config.json',
githubQueries: [
{
name: 'Merge Queue',
query: `is:pr is:open label:"action: merge"`,
},
{
name: 'Merge Assistance Queue',
query: `is:pr is:open label:"merge: caretaker note" label:"action: merge"`,
},
{
name: 'Initial Triage Queue',
query: `is:open no:milestone -draft:true`,
},
],
hasEmeaCaretaker: true,
};
-21
View File
@@ -1,21 +0,0 @@
import {CaretakerConfig} from '@angular/ng-dev';
/** The configuration for `ng-dev caretaker` commands. */
export const caretaker: CaretakerConfig = {
g3SyncConfigPath: './.ng-dev/google-sync-config.json',
githubQueries: [
{
name: 'Merge Queue',
query: `is:pr is:open label:"action: merge"`,
},
{
name: 'Merge Assistance Queue',
query: `is:pr is:open label:"merge: caretaker note" label:"action: merge"`,
},
{
name: 'Initial Triage Queue',
query: `is:open no:milestone -draft:true`,
},
],
caretakerGroup: 'angular-caretaker',
};
+38
View File
@@ -0,0 +1,38 @@
/**
* The configuration for `ng-dev commit-message` commands.
*
* @type { import("@angular/ng-dev").CommitMessageConfig }
*/
export const commitMessage = {
maxLineLength: Infinity,
minBodyLength: 20,
minBodyLengthTypeExcludes: ['docs'],
// If you update this, also update the docs.
// https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md#scope
scopes: [
'animations',
'benchpress',
'common',
'compiler',
'compiler-cli',
'core',
'dev-infra',
'devtools',
'docs-infra',
'elements',
'forms',
'http',
'language-service',
'language-server',
'localize',
'migrations',
'platform-browser',
'platform-browser-dynamic',
'platform-server',
'router',
'service-worker',
'upgrade',
'vscode-extension',
'zone.js',
],
};
-38
View File
@@ -1,38 +0,0 @@
import {CommitMessageConfig} from '@angular/ng-dev';
/**
* The configuration for `ng-dev commit-message` commands.
*/
export const commitMessage: CommitMessageConfig = {
maxLineLength: Infinity,
minBodyLength: 20,
minBodyLengthTypeExcludes: ['docs'],
// If you update this, also update the docs.
// https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md#scope
scopes: [
'animations',
'benchpress',
'common',
'compiler',
'compiler-cli',
'core',
'dev-infra',
'devtools',
'docs-infra',
'elements',
'forms',
'http',
'language-service',
'language-server',
'localize',
'migrations',
'platform-browser',
'platform-browser-dynamic',
'platform-server',
'router',
'service-worker',
'upgrade',
'vscode-extension',
'zone.js',
],
};
+8
View File
@@ -0,0 +1,8 @@
import {caretaker} from './caretaker.mjs';
import {commitMessage} from './commit-message.mjs';
import {format} from './format.mjs';
import {github} from './github.mjs';
import {pullRequest} from './pull-request.mjs';
import {release} from './release.mjs';
export {commitMessage, format, github, pullRequest, caretaker, release};
-15
View File
@@ -1,15 +0,0 @@
import {caretaker} from './caretaker.mjs';
import {commitMessage} from './commit-message.mjs';
import {format} from './format.mjs';
import {github} from './github.mjs';
import {pullRequest} from './pull-request.mjs';
import {release} from './release.mjs';
export {
commitMessage,
format,
github,
pullRequest,
caretaker,
release,
};
+9
View File
@@ -0,0 +1,9 @@
/**
* Configuration for the `ng-dev format` command.
*
* @type { import("@angular/ng-dev").FormatConfig }
*/
export const format = {
'prettier': true,
'buildifier': true,
};
-34
View File
@@ -1,34 +0,0 @@
import {FormatConfig} from '@angular/ng-dev';
/**
* Configuration for the `ng-dev format` command.
*/
export const format: FormatConfig = {
'prettier': {
'matchers': [
'**/*.{yaml,yml}',
'**/*.{js,ts,mjs,mts,cjs,cts,tsx}',
'devtools/**/*.{js,ts,mjs,mts,cjs,cts,html,scss}',
'integration/**/size.json',
// Do not format d.ts files as they are generated
'!**/*.d.ts',
// Both third_party and .yarn are directories containing copied code which should
// not be modified.
'!third_party/**',
// Do not format the locale files which are checked-in for Google3, but generated using
// the `generate-locales-tool` from `packages/common/locales`.
'!packages/core/src/i18n/locale_en.ts',
'!packages/common/locales/closure-locale.ts',
'!packages/common/src/i18n/currencies.ts',
// Test cases contain non valid code.
'!packages/compiler-cli/test/compliance/test_cases/**/*.{js,ts,mjs,mts,cjs,cts}',
// Ignore generated javascript file(s)
'!.github/actions/deploy-docs-site/main.js',
// Ignore testing data files for language service
'!vscode-ng-language-service/syntaxes/test/data/*.ts',
],
},
'buildifier': true,
};
+13
View File
@@ -0,0 +1,13 @@
/**
* Github configuration for the `ng-dev` command. This repository is used as
* remote for the merge script and other utilities like `ng-dev pr rebase`.
*
* @type { import("@angular/ng-dev").GithubConfig }
*/
export const github = {
owner: 'angular',
name: 'angular',
mainBranchName: 'main',
mergeMode: 'caretaker-only',
requireReleaseModeForRelease: false,
};
-12
View File
@@ -1,12 +0,0 @@
import {GithubConfig} from '@angular/ng-dev';
/**
* Github configuration for the `ng-dev` command. This repository is used as
* remote for the merge script and other utilities like `ng-dev pr rebase`.
*/
export const github: GithubConfig = {
owner: 'angular',
name: 'angular',
mainBranchName: 'main',
useNgDevAuthService: true,
};
+2
View File
@@ -16,6 +16,7 @@
"packages/docs/**",
"packages/elements/schematics/**",
"packages/examples/**",
"packages/forms/signals/src/api/rules/validation/standard_schema.ts",
"packages/localize/**",
"packages/private/**",
"packages/service-worker/**",
@@ -32,6 +33,7 @@
"**/rollup.config.js",
"**/BUILD.bazel",
"**/*.md",
"**/package.json",
"packages/**/integrationtest/**",
"packages/**/test/**",
"packages/zone.js/*",
+34
View File
@@ -0,0 +1,34 @@
/**
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
* are respected by the merge script (e.g. the target labels).
*
* @type { import("@angular/ng-dev").PullRequestConfig }
*/
export const pullRequest = {
githubApiMerge: {
default: 'auto',
labels: [{pattern: 'merge: squash commits', method: 'squash'}],
},
requiredBaseCommits: {
// PRs that target either `main` or the patch branch, need to be rebased
// on top of the latest commit message validation fix.
// These SHAs are the commits that update the required license text in the header.
'main': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a',
'10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24',
},
// `docs-infra` are not affecting the public NPM packages.
targetLabelExemptScopes: ['docs-infra'],
// enables specific validations during the pull request merge process
validators: {
assertEnforceTested: true,
assertIsolatedSeparateFiles: true,
},
requiredStatuses: [
{type: 'check', name: 'test'},
{type: 'check', name: 'lint'},
{type: 'check', name: 'adev'},
{type: 'check', name: 'zone-js'},
{type: 'status', name: 'google-internal-tests'},
],
};
-33
View File
@@ -1,33 +0,0 @@
import {PullRequestConfig} from '@angular/ng-dev';
/**
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
* are respected by the merge script (e.g. the target labels).
*/
export const pullRequest: PullRequestConfig = {
githubApiMerge: false,
requiredBaseCommits: {
// PRs that target either `main` or the patch branch, need to be rebased
// on top of the latest commit message validation fix.
// These SHAs are the commits that update the required license text in the header.
'main': '5aeb9a4124922d8ac08eb73b8f322905a32b0b3a',
'10.0.x': '27b95ba64a5d99757f4042073fd1860e20e3ed24',
},
// `dev-infra` and `docs-infra` are not affecting the public NPM packages. Similarly,
// the `bazel` package is not considered part of the public API so that features
// can land in patch branches.
targetLabelExemptScopes: ['dev-infra', 'docs-infra', 'bazel'],
// enables specific validations during the pull request merge process
validators: {
assertEnforceTested: true,
assertIsolatedSeparateFiles: true,
},
requiredStatuses: [
{type: 'check', name: 'test'},
{type: 'check', name: 'lint'},
{type: 'check', name: 'adev'},
{type: 'check', name: 'zone-js'},
{type: 'status', name: 'google-internal-tests'},
],
};
+44
View File
@@ -0,0 +1,44 @@
/**
* Configuration for the `ng-dev release` command.
*
* @type { import("@angular/ng-dev").ReleaseConfig }
*/
export const release = {
publishRegistry: 'https://wombat-dressing-room.appspot.com',
representativeNpmPackage: '@angular/core',
npmPackages: [
{name: '@angular/animations'},
{name: '@angular/common'},
{name: '@angular/compiler-cli'},
{name: '@angular/compiler'},
{name: '@angular/core'},
{name: '@angular/elements'},
{name: '@angular/forms'},
{name: '@angular/language-server'},
{name: '@angular/language-service'},
{name: '@angular/localize'},
{name: '@angular/platform-browser-dynamic'},
{name: '@angular/platform-browser'},
{name: '@angular/platform-server'},
{name: '@angular/router'},
{name: '@angular/service-worker'},
{name: '@angular/upgrade'},
],
buildPackages: async () => {
// The buildTargetPackages function is loaded at runtime as the loading the script
// causes an invocation of Bazel.
const {performNpmReleaseBuild} = await import('../scripts/build/package-builder.mts');
return performNpmReleaseBuild();
},
releaseNotes: {
hiddenScopes: [
'dev-infra',
'docs-infra',
'zone.js',
'devtools',
'vscode-extension',
'benchpress',
],
},
releasePrLabels: ['area: build & ci', 'action: merge', 'PullApprove: disable'],
};
-42
View File
@@ -1,42 +0,0 @@
import {ReleaseConfig} from '@angular/ng-dev';
/** Configuration for the `ng-dev release` command. */
export const release: ReleaseConfig = {
publishRegistry: 'https://wombat-dressing-room.appspot.com',
representativeNpmPackage: '@angular/core',
npmPackages: [
{name: '@angular/animations'},
{name: '@angular/common'},
{name: '@angular/compiler-cli'},
{name: '@angular/compiler'},
{name: '@angular/core'},
{name: '@angular/elements'},
{name: '@angular/forms'},
{name: '@angular/language-server'},
{name: '@angular/language-service'},
{name: '@angular/localize'},
{name: '@angular/platform-browser-dynamic'},
{name: '@angular/platform-browser'},
{name: '@angular/platform-server'},
{name: '@angular/router'},
{name: '@angular/service-worker'},
{name: '@angular/upgrade'},
],
buildPackages: async () => {
// The buildTargetPackages function is loaded at runtime as the loading the script
// causes an invocation of Bazel.
const {performNpmReleaseBuild} = await import('../scripts/build/package-builder.mjs');
return performNpmReleaseBuild();
},
releaseNotes: {
hiddenScopes: [
'dev-infra',
'docs-infra',
'zone.js',
'devtools',
'vscode-extension',
'benchpress',
],
},
releasePrLabels: ['area: build & ci', 'action: merge', 'PullApprove: disable'],
};
+1 -1
View File
@@ -1 +1 @@
22.21.0
22.22.2
+17 -8
View File
@@ -1,5 +1,5 @@
// TODO: Define these packages in a single common location.
const localAngularPackages = [
const localAngularPackages = new Set([
'@angular/animations',
'@angular/common',
'@angular/compiler',
@@ -15,7 +15,9 @@ const localAngularPackages = [
'@angular/router',
'@angular/service-worker',
'@angular/upgrade',
];
]);
const peerDepsToChange = new Set(['zone.js', 'rxjs']);
function readPackage(pkg, context) {
// TODO(devversion): This allows us to make compiler/TS a production dependency of compiler-cli
@@ -25,31 +27,38 @@ function readPackage(pkg, context) {
pkg.dependencies = {
...pkg.dependencies,
'@angular/compiler': 'workspace:*',
'typescript': '5.9.0-beta',
'typescript': pkg.devDependencies['typescript'],
};
delete pkg.devDependencies['typescript'];
}
Object.entries(pkg.peerDependencies).forEach(([key, version]) => {
for (const [key, version] of Object.entries(pkg.peerDependencies)) {
// Any package that has a peerDependency on rxjs or zone.js, should instead treat the peerDependency as a
// regular dependency.
if (['rxjs', 'zone.js'].includes(key)) {
if (peerDepsToChange.has(key)) {
pkg.dependencies = {
...pkg.dependencies,
[key]: version,
[key]: pkg.devDependencies[key] ?? version,
};
delete pkg.devDependencies[key];
continue;
}
// Change all locally generated packages to directly depend on the other local packages, instead
// of expecting them as peerDependencies automatically as we do not auto install peer deps. The
// package is also removed from peerDependencies as it was moved over and will just cause errors.
if (localAngularPackages.includes(key) && pkg.version === '0.0.0-PLACEHOLDER') {
if (pkg.version === '0.0.0-PLACEHOLDER' && localAngularPackages.has(key)) {
pkg.dependencies = {
...pkg.dependencies,
[key]: 'workspace: *',
};
delete pkg.peerDependencies[key];
}
});
}
return pkg;
}
+44 -2
View File
@@ -1,3 +1,45 @@
.prettierrc
pnpm-lock.yaml
pnpm-lock.yaml
# Do not format d.ts files as they are generated
**/*.d.ts
# Both third_party and .yarn are directories containing copied code which should
# not be modified.
third_party/**/*.js
third_party/**/*.css
third_party/**/*.md
third_party/**/*.json
# Do not format the locale files which are checked-in for Google3, but generated using
# the `generate-locales-tool` from `packages/common/locales`.
packages/core/src/i18n/locale_en.ts
packages/common/locales/closure-locale.ts
packages/common/src/i18n/currencies.ts
# Test cases contain non valid code.
packages/compiler-cli/test/compliance/test_cases/**/*.js
packages/compiler-cli/test/compliance/test_cases/**/*.ts
# Ignore generated javascript file(s)
.github/actions/deploy-docs-site/main.js
# Ignore testing data files for language service
vscode-ng-language-service/syntaxes/test/data/*.ts
vscode-ng-language-service/syntaxes/test/data/*.html
# Ignore goldens MD files
goldens/**/*.api.md
# Ignore golden symbol json files
packages/**/*.golden_symbols.json
# adev generated files
adev/src/content/aria/**/*.json
adev/src/content/cli/**/*.json
adev/src/content/cdk/**/*.json
# Antigravity rules
.agent/rules/agents.md
CHANGELOG.md
CHANGELOG_ARCHIVE.md
+16 -2
View File
@@ -2,10 +2,24 @@
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"embeddedLanguageFormatting": "off",
"singleQuote": true,
"semi": true,
"quoteProps": "preserve",
"bracketSpacing": false,
"trailingComma": "all"
"trailingComma": "all",
"overrides": [
{
"files": ["./.prettierrc"],
"options": {
"parser": "json"
}
},
{
"files": ["*.html"],
"excludeFiles": ["**/test/**"],
"options": {
"parser": "angular"
}
}
]
}
+39 -92
View File
@@ -15,9 +15,6 @@
# - We trust that people do the right thing and won't approve changes they don't feel confident reviewing
# - We enforce that only approved PRs are merged ensuring that unreviewed code isn't accidentally merged
# - We distribute approval rights as much as possible to help us scale better
# - Groups have one or two global approvers groups as fallbacks:
# - @angular/fw-global-approvers: for approving minor changes, large-scale refactorings, and emergency situations.
# - @angular/fw-global-approvers-for-docs-only-changes: for approving minor documentation-only changes that don't require engineering review
# - A small number of file groups have very limited number of reviewers because incorrect changes to the files they guard would have serious consequences (e.g. security, public api)
#
# Configuration nuances:
@@ -37,23 +34,6 @@
# See reviewer list under `required-minimum-review` group. Team member names and
# usernames are managed there.
####################################################################################
# Approval Groups
####################################################################################
# =========================================================
# @angular/framework-global-approvers
# =========================================================
# Used for approving minor changes, large-scale refactorings, and in emergency situations.
#
# alxhub
# jelbourn
# josephperrott
#
# =========================================================
# @angular/framework-global-approvers-for-docs-only-changes
# =========================================================
# Used for approving minor documentation-only changes that don't require engineering review.
version: 3
#availability:
@@ -97,14 +77,6 @@ overrides:
- if: len(groups.active.exclude("required-minimum-review").exclude("global-*")) == 0 and len(groups.approved.include("global-*")) == 0
status: failure
explanation: 'At least one group must match this PR. Please update an existing review group, or create a new group.'
# If any global dev-infra approval is given the status should be passing.
- if: len(groups.approved.include("global-dev-infra-approvers")) == 1
status: success
explanation: 'Passing as globally approved by dev-infra'
# If any global docs approval is given the status should be passing.
- if: len(groups.approved.include("global-docs-approvers")) == 1
status: success
explanation: 'Passing as globally approved by docs'
# If any global approval is given the status should be passing.
- if: len(groups.approved.include("global-approvers")) == 1
status: success
@@ -134,10 +106,10 @@ groups:
- thePunderWoman
- kirjs
- JoostK
- mmalerba
- ~amishne
- ~leonsenft
- ~mattrbeck
- ~JeanMeche
# =========================================================
# Framework: General (most code in our packages)
@@ -148,6 +120,7 @@ groups:
- >
contains_any_globs(files.exclude('packages/core/primitives/*'), [
'contributing-docs/public-api-surface.md',
'dev-app/**/{*,.*}',
'integration/**/{*,.*}',
'modules/**/{*,.*}',
'packages/animations/**/{*,.*}',
@@ -177,10 +150,8 @@ groups:
- crisbeto
- devversion
- kirjs
- ~jelbourn
- thePunderWoman
- ~pkozlowski-opensource
- mmalerba
- JeanMeche
- ~amishne
- ~leonsenft
@@ -207,9 +178,9 @@ groups:
reviewers:
users:
- ~alxhub
- jelbourn
- josephperrott
- ~pkozlowski-opensource
- alan-agius4
reviews:
request: -1 # request reviews from everyone
required: 2 # require at least 2 approvals
@@ -228,7 +199,6 @@ groups:
reviewers:
users:
- ~JiaLiPassion
- ~jelbourn
- ~alxhub
- AndrewKushnir
- atscott
@@ -237,7 +207,6 @@ groups:
- kirjs
- thePunderWoman
- ~pkozlowski-opensource
- mmalerba
- ~amishne
- ~leonsenft
- ~mattrbeck
@@ -274,6 +243,8 @@ groups:
- >
contains_any_globs(files, [
'adev/**/{*,.*}',
'tools/manual_api_docs/blocks/*.md',
'tools/manual_api_docs/elements/*.md',
])
reviewers:
users:
@@ -285,18 +256,18 @@ groups:
- crisbeto
- kirjs
- JeanMeche
- jelbourn
- thePunderWoman
- devversion
- josephperrott
- ~pkozlowski-opensource
- mgechev
- ~mgechev
- MarkTechson
- mmalerba
- ~hawkgs
- ~amishne
- ~leonsenft
- ~mattrbeck
- ~clydin
- ~dgp1130
# =========================================================
# Angular DevTools
@@ -314,7 +285,7 @@ groups:
- ~devversion
- dgp1130
- hawkgs
- jkrems
- hybrist
- ~josephperrott
- JeanMeche
- milomg
@@ -326,8 +297,13 @@ groups:
<<: *defaults
conditions:
- >
contains_any_globs(files.exclude('.pullapprove.yml'), [
contains_any_globs(files
.exclude('.pullapprove.yml')
.exclude('tools/manual_api_docs/blocks/*.md')
.exclude('tools/manual_api_docs/elements/*.md'),
[
'{*,.*}',
'.agent/**/{*,.*}',
'.devcontainer/**/{*,.*}',
'.github/**/{*,.*}',
'.husky/**/{*,.*}',
@@ -364,6 +340,7 @@ groups:
- author not in ["angular-robot"]
reviewers:
users:
- alan-agius4
- devversion
- josephperrott
@@ -398,15 +375,13 @@ groups:
- AndrewKushnir
- ~alxhub
- atscott
- ~jelbourn
- thePunderWoman
- ~pkozlowski-opensource
- kirjs
- mmalerba
- crisbeto
- devversion
- JeanMeche
- ~jkrems
- ~hybrist
- ~iteriani
- ~tbondwilkinson
- ~rahatarmanahmed
@@ -436,10 +411,8 @@ groups:
- AndrewKushnir
- atscott
- kirjs
- ~jelbourn
- thePunderWoman
- ~pkozlowski-opensource
- mmalerba
- ~amishne
- ~leonsenft
- ~mattrbeck
@@ -448,6 +421,24 @@ groups:
required: 1 # Require that 1 person approve
reviewed_for: required
# =========================================================
# Agent Skills
# =========================================================
agent-skills:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
'skills/{*,.*}',
'skills/**/{*,.*}',
])
reviewers:
users:
- MarkTechson
- kirjs
- ~JeanMeche
- ~dgp1130
####################################################################################
# Special Cases
####################################################################################
@@ -468,7 +459,6 @@ groups:
- AndrewKushnir
- andrewseguin
- dgp1130
- ~jelbourn
- thePunderWoman
- josephperrott
@@ -491,17 +481,13 @@ groups:
- thePunderWoman # Jessica Janiuk
- AndrewKushnir # Andrew Kushnir
- atscott # Andrew Scott
labels:
pending: 'requires: TGP'
approved: 'requires: TGP'
rejected: 'requires: TGP'
# External team required reviews
primitives-shared:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
contains_any_globs(files.exclude('packages/core/primitives/**/*spec.ts'), [
'packages/core/primitives/**/{*,.*}',
])
reviewers:
@@ -512,10 +498,6 @@ groups:
- tbondwilkinson # Tom Wilkinson
- rahatarmanahmed # Rahat Ahmed
- ENAML # Ethan Cline
labels:
pending: 'requires: TGP'
approved: 'requires: TGP'
rejected: 'requires: TGP'
####################################################################################
# Override managed result groups
@@ -536,44 +518,9 @@ groups:
global-approvers:
type: optional
reviewers:
teams:
- framework-global-approvers
reviews:
request: 0
required: 1
reviewed_for: required
# =========================================================
# Global Approvers For Docs
#
# All reviews performed for global docs approvals require
# using the `Reviewed-for:` specifier to set the approval
# specificity as documented at:
# https://docs.pullapprove.com/reviewed-for/
# =========================================================
global-docs-approvers:
type: optional
reviewers:
teams:
- framework-global-approvers-for-docs-only-changes
reviews:
request: 0
required: 1
reviewed_for: required
# =========================================================
# Global Approvers For Dev-Infra changes
#
# All reviews performed for global dev-infra approvals
# require using the `Reviewed-for:` specifier to set the
# approval specificity as documented at:
# https://docs.pullapprove.com/reviewed-for/
# =========================================================
global-dev-infra-approvers:
type: optional
reviewers:
teams:
- dev-infra-framework
users:
- alxhub
- josephperrott
reviews:
request: 0
required: 1
+34
View File
@@ -0,0 +1,34 @@
---
trigger: always_on
---
This is the source code for the Angular framework. This guide outlines standard practices for AI agents working in this repository.
## Environment
- Use `pnpm` for package management.
- Use `pnpm bazel test //target` to run tests.
## Key Documentation
- [Building and Testing](contributing-docs/building-and-testing-angular.md): definitive guide for running targets.
- [Coding Standards](contributing-docs/coding-standards.md): style guide for TypeScript and other files.
- [Commit Guidelines](contributing-docs/commit-message-guidelines.md): format for commit messages and PR titles.
## Testing
- **Zoneless & Async-First:** Assume a zoneless environment where state changes schedule updates asynchronously.
- **Do NOT** use `fixture.detectChanges()` to manually trigger updates.
- **ALWAYS** use the "Act, Wait, Assert" pattern:
1. **Act:** Update state or perform an action.
2. **Wait:** `await fixture.whenStable()` to allow the framework to process the scheduled update.
3. **Assert:** Verify the output.
- To keep tests fast, minimize the need for waiting:
- Use `useAutoTick()` (from `packages/private/testing/src/utils.ts`) to fast-forward time via the mock clock.
- When waiting is necessary, use real async tests (`it('...', async () => { ... })`) along with:
- `await timeout(ms)` (from `packages/private/testing/src/utils.ts`) to wait a specific number of milliseconds.
- `await fixture.whenStable()` to wait for framework stability.
## Pull Requests
- Use the `gh` CLI (GitHub CLI) for creating and managing pull requests.
+6008 -3533
View File
File diff suppressed because it is too large Load Diff
+5519 -5035
View File
File diff suppressed because it is too large Load Diff
+13 -13
View File
@@ -14,20 +14,20 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:
* Use welcoming and inclusive language
* Respect each other
* Provide and gracefully accept constructive criticism
* Show empathy towards other community members
- Use welcoming and inclusive language
- Respect each other
- Provide and gracefully accept constructive criticism
- Show empathy towards other community members
Examples of unacceptable behavior by participants include:
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* The use of sexualized language or imagery
* Unwelcome sexual attention or advances
* Other conduct which could reasonably be considered inappropriate in a
- The use of sexualized language or imagery
- Unwelcome sexual attention or advances
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
@@ -69,9 +69,9 @@ members of the project's leadership.
If you are banned you may contest the decision. To do so email conduct@angular.io with the subject line "Repeal Ban for {{your name here}}" and body with the responses to the following:
* Why do you believe you did not violate the Code of Conduct?
* Were other factors involved in this situation the leadership team may have been unaware of?
* Why do you wish to be a part of the Angular community?
- Why do you believe you did not violate the Code of Conduct?
- Were other factors involved in this situation the leadership team may have been unaware of?
- Why do you wish to be a part of the Angular community?
## Attribution
+98 -91
View File
@@ -3,22 +3,20 @@
We would love for you to contribute to Angular and help make it even better than it is today!
As a contributor, here are the guidelines we would like you to follow:
- [Code of Conduct](#coc)
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Coding Rules](#rules)
- [Commit Message Guidelines](#commit)
- [Signing the CLA](#cla)
- [Code of Conduct](#coc)
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Coding Rules](#rules)
- [Commit Message Guidelines](#commit)
- [Signing the CLA](#cla)
## <a name="coc"></a> Code of Conduct
Help us keep Angular open and inclusive.
Please read and follow our [Code of Conduct][coc].
## <a name="question"></a> Got a Question or Problem?
Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests.
@@ -34,28 +32,25 @@ To save your and our time, we will systematically close all issues that are requ
If you would like to chat about the question in real-time, you can reach out via [the Angular community Discord server][discord].
## <a name="issue"></a> Found a Bug?
If you find a bug in the source code, you can help us by [submitting an issue](#submit-issue) to our [GitHub Repository][github].
Even better, you can [submit a Pull Request](#submit-pr) with a fix.
## <a name="feature"></a> Missing a Feature?
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository.
If you would like to *implement* a new feature, please consider the size of the change in order to determine the right steps to proceed:
* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub Repository.
If you would like to _implement_ a new feature, please consider the size of the change in order to determine the right steps to proceed:
- For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
**Note**: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature.
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
## <a name="submit"></a> Submission Guidelines
### <a name="submit-issue"></a> Submitting an Issue
Before you submit an issue, please search the issue tracker. An issue for your problem might already exist and the discussion might inform you of workarounds readily available.
@@ -74,50 +69,67 @@ Unfortunately, we are not able to investigate / fix bugs without a minimal repro
You can file new issues by selecting from our [new issue templates](https://github.com/angular/angular/issues/new/choose) and filling out the issue template.
### <a name="pr-quality"></a> Contribution Quality
We strongly value open source contribution and pull requests from community contributors. Please note that every pull request is reviewed and merged by an actual person on the team, which does take time and effort. That is time and effort that does take away from other valuable work. With that in mind we have a minimum set of expectations that are required of any community contribution pull request that is opened.
1. Search [GitHub](https://github.com/angular/angular/pulls) for an open or closed PR that relates to your submission.
- You don't want to duplicate existing efforts.
2. Be sure that an issue or pull request clearly describes the problem you're fixing, or documents the design for the feature you'd like to add. Issues require a _minimal_ reproduction.
3. Discussing the design in an issue upfront helps to ensure that we're ready to accept your work. Pull requests are not the right place to do design work.
- When in doubt, open an issue first before doing any sort of speculative implementation work
4. Ideally the PR should be tied to an issue, but this is not required
5. The change should improve code quality (i.e. addressing a TODO) or should impact / improve a feature
6. Micro optimizations will only be accepted if they are validated by an actual benchmark
7. Do not open pull requests that are addressing feature requests that are not labeled as "help wanted" as they usually need additional design work before we could accept pull requests
8. The change should be well tested
If your pull request does not meet these minimum expectations, we may close your PR. Also, if your PR introduces a breaking change, it's possible the level of churn this breaking change causes may block our ability to move forward with it. We may close your PR in that situation, as well. Otherwise, we're excited to see your contributions and enthusiasm for Angular!
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
Before you submit your Pull Request (PR) consider the following guidelines:
1. Search [GitHub](https://github.com/angular/angular/pulls) for an open or closed PR that relates to your submission.
You don't want to duplicate existing efforts.
2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add.
Discussing the design upfront helps to ensure that we're ready to accept your work.
3. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
1. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
We cannot accept code without a signed CLA.
Make sure you author all contributed Git commits with email address associated with your CLA signature.
4. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [angular/angular](https://github.com/angular/angular/fork) repo.
2. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [angular/angular](https://github.com/angular/angular/fork) repo.
5. In your forked repository, make your changes in a new git branch:
3. In your forked repository, make your changes in a new git branch:
```shell
git checkout -b my-fix-branch main
```
```shell
git checkout -b my-fix-branch main
```
6. Create your patch, **including appropriate test cases**.
4. Create your patch, **including appropriate test cases**.
7. Follow our [Coding Rules](#rules).
5. Follow our [Coding Rules](#rules).
8. Run the full Angular test suite, as described in the [developer documentation][dev-doc], and ensure that all tests pass.
6. Run the full Angular test suite, as described in the [developer documentation][dev-doc], and ensure that all tests pass.
9. Commit your changes using a descriptive commit message that follows our [commit message conventions][commit-message-guidelines].
7. Commit your changes using a descriptive commit message that follows our [commit message conventions][commit-message-guidelines].
Adherence to these conventions is necessary because release notes are automatically generated from these messages.
```shell
git commit --all
```
Note: the optional commit `--all` command line option will automatically "add" and "rm" edited files.
```shell
git commit --all
```
10. Push your branch to GitHub:
Note: the optional commit `--all` command line option will automatically "add" and "rm" edited files.
```shell
git push origin my-fix-branch
```
8. Push your branch to GitHub:
11. In GitHub, send a pull request to `angular:main`.
```shell
git push origin my-fix-branch
```
9. In GitHub, send a pull request to `angular:main`.
### Reviewing a Pull Request
@@ -133,16 +145,15 @@ If we ask for changes via code reviews then:
3. Create a fixup commit and push to your GitHub repository (this will update your Pull Request):
```shell
git commit --all --fixup HEAD
git push
```
```shell
git commit --all --fixup HEAD
git push
```
For more info on working with fixup commits see [here](./contributing-docs/using-fixup-commits.md).
For more info on working with fixup commits see [here](./contributing-docs/using-fixup-commits.md).
That's it! Thank you for your contribution!
##### Updating the commit message
A reviewer might often suggest changes to a commit message (for example, to add more context for a change or adhere to our [commit message guidelines][commit-message-guidelines]).
@@ -150,69 +161,68 @@ In order to update the commit message of the last commit on your branch:
1. Check out your branch:
```shell
git checkout my-fix-branch
```
```shell
git checkout my-fix-branch
```
2. Amend the last commit and modify the commit message:
```shell
git commit --amend
```
```shell
git commit --amend
```
3. Push to your GitHub repository:
```shell
git push --force-with-lease
```
```shell
git push --force-with-lease
```
> NOTE:<br />
> If you need to update the commit message of an earlier commit, you can use `git rebase` in interactive mode.
> See the [git docs](https://git-scm.com/docs/git-rebase#_interactive_mode) for more details.
#### After your pull request is merged
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
```shell
git push origin --delete my-fix-branch
```
```shell
git push origin --delete my-fix-branch
```
* Check out the main branch:
- Check out the main branch:
```shell
git checkout main -f
```
```shell
git checkout main -f
```
* Delete the local branch:
- Delete the local branch:
```shell
git branch -D my-fix-branch
```
```shell
git branch -D my-fix-branch
```
* Update your local `main` with the latest upstream version:
```shell
git pull --ff upstream main
```
- Update your local `main` with the latest upstream version:
```shell
git pull --ff upstream main
```
## <a name="rules"></a> Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working:
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* All public API methods **must be documented**.
* We follow [Google's TypeScript Style Guide][ts-style-guide], but wrap all code at **100 characters**.
An automated formatter is available, see [building-and-testing-angular.md](./contributing-docs/building-and-testing-angular.md#formatting-your-source-code).
- All features or bug fixes **must be tested** by one or more specs (unit-tests).
- All public API methods **must be documented**.
- We follow [Google's TypeScript Style Guide][ts-style-guide], but wrap all code at **100 characters**.
An automated formatter is available, see [building-and-testing-angular.md](./contributing-docs/building-and-testing-angular.md#formatting-your-source-code).
## <a name="commit"></a> Commit Message Guidelines
We have very precise rules over how our Git commit messages must be formatted:
```
<type>(<scope>): <short summary>
```
@@ -224,21 +234,18 @@ See [Commit Message Guidelines][commit-message-guidelines] for details.
Please sign our Contributor License Agreement (CLA) before sending pull requests. For any code
changes to be accepted, the CLA must be signed. It's a quick process, we promise!
* For individuals, we have a [simple click-through form][individual-cla].
* For corporations, we'll need you to
- For individuals, we have a [simple click-through form][individual-cla].
- For corporations, we'll need you to
[print, sign and one of scan+email, fax or mail the form][corporate-cla].
If you have more than one GitHub accounts, or multiple email addresses associated with a single GitHub account, you must sign the CLA using the primary email address of the GitHub account used to author Git commits and send pull requests.
If you have more than one GitHub account, or multiple email addresses associated with a single GitHub account, you must sign the CLA using the primary email address of the GitHub account used to author Git commits and send pull requests.
The following documents can help you sort out issues with GitHub accounts and multiple email addresses:
* https://help.github.com/articles/setting-your-commit-email-address-in-git/
* https://stackoverflow.com/questions/37245303/what-does-usera-committed-with-userb-13-days-ago-on-github-mean
* https://help.github.com/articles/about-commit-email-addresses/
* https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/
- https://help.github.com/articles/setting-your-commit-email-address-in-git/
- https://stackoverflow.com/questions/37245303/what-does-usera-committed-with-userb-13-days-ago-on-github-mean
- https://help.github.com/articles/about-commit-email-addresses/
- https://help.github.com/articles/blocking-command-line-pushes-that-expose-your-personal-email-address/
[coc]: https://github.com/angular/code-of-conduct/blob/main/CODE_OF_CONDUCT.md
[corporate-cla]: https://cla.developers.google.com/about/google-corporate
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
Copyright (c) 2010-2026 Google LLC. https://angular.dev/license
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+37 -30
View File
@@ -4,50 +4,61 @@ module(
name = "angular",
)
bazel_dep(name = "rules_pkg", version = "1.1.0")
bazel_dep(name = "rules_nodejs", version = "6.6.0")
bazel_dep(name = "aspect_rules_ts", version = "3.7.0")
bazel_dep(name = "aspect_rules_js", version = "2.6.2")
bazel_dep(name = "aspect_rules_esbuild", version = "0.23.0")
bazel_dep(name = "aspect_rules_jasmine", version = "2.0.0")
bazel_dep(name = "rules_pkg", version = "1.2.0")
bazel_dep(name = "rules_nodejs", version = "6.7.4")
bazel_dep(name = "aspect_rules_ts", version = "3.8.8")
bazel_dep(name = "aspect_rules_js", version = "3.0.3")
bazel_dep(name = "aspect_rules_esbuild", version = "0.25.1")
bazel_dep(name = "aspect_rules_jasmine", version = "2.0.4")
bazel_dep(name = "aspect_rules_rollup", version = "2.0.1")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "aspect_bazel_lib", version = "2.21.2")
bazel_dep(name = "tar.bzl", version = "0.6.0")
bazel_dep(name = "yq.bzl", version = "0.3.1")
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "bazel_lib", version = "3.2.2")
bazel_dep(name = "tar.bzl", version = "0.10.1")
bazel_dep(name = "yq.bzl", version = "0.3.6")
bazel_dep(name = "rules_angular")
git_override(
module_name = "rules_angular",
commit = "c3721b6ece2050a59a97562e3b95527a3092b03b",
remote = "https://github.com/devversion/rules_angular.git",
commit = "c6f7e15470934f7c2fe46ff5bae7d68be0230501",
remote = "https://github.com/angular/rules_angular.git",
)
bazel_dep(name = "devinfra")
git_override(
module_name = "devinfra",
commit = "5c8f5f7c0a4e805a8ee33706ee2df99854396bbd",
commit = "f018eca84d10c594e16e9517ade1254a36dc8733",
remote = "https://github.com/angular/dev-infra.git",
)
bazel_dep(name = "rules_sass")
git_override(
module_name = "rules_sass",
commit = "1184a80751a21af8348f308abc5b38a41f26850e",
remote = "https://github.com/devversion/rules_sass.git",
commit = "dfb751533767caa759a7162a34cfe0852f988976",
remote = "https://github.com/angular/rules_sass.git",
)
bazel_dep(name = "rules_browsers")
git_override(
module_name = "rules_browsers",
commit = "6a699bf3e896690e2923cf3ade29fbd4e492e366",
remote = "https://github.com/devversion/rules_browsers.git",
commit = "af35c89a5a099c4bbc3f1a3495688cf51bd6a8da",
remote = "https://github.com/angular/rules_browsers.git",
)
yq = use_extension("@yq.bzl//yq:extensions.bzl", "yq")
use_repo(yq, "yq_toolchains")
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "20.19.0")
node.toolchain(
node_repositories = {
"22.22.2-darwin_arm64": ("node-v22.22.2-darwin-arm64.tar.gz", "node-v22.22.2-darwin-arm64", "db4b275b83736df67533529a18cc55de2549a8329ace6c7bcc68f8d22d3c9000"),
"22.22.2-darwin_amd64": ("node-v22.22.2-darwin-x64.tar.gz", "node-v22.22.2-darwin-x64", "12a6abb9c2902cf48a21120da13f87fde1ed1b71a13330712949e8db818708ba"),
"22.22.2-linux_arm64": ("node-v22.22.2-linux-arm64.tar.xz", "node-v22.22.2-linux-arm64", "e9e1930fd321a470e29bb68f30318bf58e3ecb4acb4f1533fb19c58328a091fe"),
"22.22.2-linux_ppc64le": ("node-v22.22.2-linux-ppc64le.tar.xz", "node-v22.22.2-linux-ppc64le", "14045b5a5030d35ca0030fb7e870bd11a651eb9b57323ebc0021e8d78ac6bac9"),
"22.22.2-linux_s390x": ("node-v22.22.2-linux-s390x.tar.xz", "node-v22.22.2-linux-s390x", "9e4a07c291b8949289c6ea8ee61b1d14666a4810feae776a8d1eb1f57e03a2fb"),
"22.22.2-linux_amd64": ("node-v22.22.2-linux-x64.tar.xz", "node-v22.22.2-linux-x64", "88fd1ce767091fd8d4a99fdb2356e98c819f93f3b1f8663853a2dee9b438068a"),
"22.22.2-windows_amd64": ("node-v22.22.2-win-x64.zip", "node-v22.22.2-win-x64", "7c93e9d92bf68c07182b471aa187e35ee6cd08ef0f24ab060dfff605fcc1c57c"),
},
node_version = "22.22.2",
)
use_repo(node, "nodejs_toolchains")
use_repo(node, "nodejs_darwin_amd64")
use_repo(node, "nodejs_darwin_arm64")
@@ -60,7 +71,8 @@ use_repo(node, "nodejs_windows_amd64")
pnpm = use_extension("@aspect_rules_js//npm:extensions.bzl", "pnpm")
pnpm.pnpm(
name = "pnpm",
pnpm_version = "10.16.1",
pnpm_version = "10.33.2",
pnpm_version_integrity = "sha512-qQ+vb+6rca1sblf5Tg/hoS9dzCLNdU20CulZPraj4LaxLjVAIYuzeuCDQEsfLObbKkEh6XmCm0r/lLmfSdoc+A==",
)
use_repo(pnpm, "pnpm")
@@ -71,7 +83,6 @@ npm.npm_translate_lock(
"//:.pnpmfile.cjs",
"//:package.json",
"//:pnpm-workspace.yaml",
"//:tools/pnpm-patches/dagre-d3-es+7.0.11.patch",
"//adev:package.json",
"//adev/shared-docs:package.json",
"//adev/shared-docs/pipeline/api-gen:package.json",
@@ -96,19 +107,17 @@ npm.npm_translate_lock(
"//packages/service-worker:package.json",
"//packages/upgrade:package.json",
"//tools/bazel/rules_angular_store:package.json",
"//vscode-ng-language-service/integration/pre_standalone_project:package.json",
"//vscode-ng-language-service/integration/project:package.json",
],
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)
use_repo(npm, "npm")
rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext")
rules_ts_ext.deps(
name = "angular_npm_typescript",
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.3 | jq -r '.dist.integrity'
# Obtained by: curl --silent https://registry.npmjs.org/typescript/6.0.1-rc | jq -r '.dist.integrity'
ts_integrity = "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
ts_version = "5.9.3",
)
@@ -116,14 +125,12 @@ use_repo(rules_ts_ext, **{"npm_typescript": "angular_npm_typescript"})
# TODO: Figure out how to make ng_project update whenever the packages/core::pkg target changes.
rules_angular = use_extension("@rules_angular//setup:extensions.bzl", "rules_angular")
use_repo_rule("@rules_angular//setup:repositories.bzl", "configurable_deps_repo")(
name = "rules_angular_configurable_deps",
angular_compiler_cli = "@angular//:node_modules/@angular/compiler-cli",
typescript = "@angular//:node_modules/typescript",
rules_angular.setup(
name = "angular_rules_angular_configurable_deps",
angular_compiler_cli = "//:node_modules/@angular/compiler-cli",
typescript = "//:node_modules/typescript",
)
override_repo(rules_angular, "rules_angular_configurable_deps")
use_repo(rules_angular, rules_angular_configurable_deps = "angular_rules_angular_configurable_deps")
register_toolchains(
"@devinfra//bazel/git-toolchain:git_linux_toolchain",
+900 -912
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -67,7 +67,7 @@ Install the Angular CLI globally:
npm install -g @angular/cli
```
Create workspace:
Create a workspace:
```
ng new [PROJECT NAME]
@@ -146,11 +146,11 @@ Join the conversation and help the community.
[angularelements]: https://angular.dev/guide/elements
[ssr]: https://angular.dev/guide/ssr
[schematics]: https://angular.dev/tools/cli/schematics
[lazyloading]: https://angular.dev/guide/ngmodules/lazy-loading
[lazyloading]: https://angular.dev/guide/routing/define-routes#lazily-loaded-components
[node.js]: https://nodejs.org/
[npm]: https://www.npmjs.com/get-npm
[codeofconduct]: CODE_OF_CONDUCT.md
[X (formerly Twitter)]: https://www.twitter.com/angular
[X (formerly Twitter)]: https://www.x.com/angular
[bluesky]: https://bsky.app/profile/angular.dev
[discord]: https://discord.gg/angular
[stackoverflow]: https://stackoverflow.com/questions/tagged/angular
+5
View File
@@ -0,0 +1,5 @@
ignore_directories([
".git",
"dist",
"**/node_modules/**",
])
+91 -59
View File
@@ -14,8 +14,8 @@ exports_files([
])
APPLICATION_FILES = [
"//adev/src/context:llms_full",
"//adev/src/assets/images",
"//adev/src/assets/images/v21-event:v21-event-images",
"//adev/src/assets/others",
"//adev/src/assets/previews",
"//adev/src/assets:tutorials",
@@ -25,44 +25,55 @@ APPLICATION_FILES = [
"//adev/src/assets:context",
"//adev/src/content/examples:embeddable",
"tailwind.config.js",
# For the routes that are generated at build time
"//adev/src/assets:docs_api_manifest",
"//adev/scripts/routes:generate_route",
"//adev/src/app/routing/navigation-entries",
"//adev/src/app/routing/navigation-entries:navigation_types",
"//adev/src/content/reference/errors:route-nav-items",
"//adev/src/content/reference/extended-diagnostics:route-nav-items",
"//adev/src/content/tutorials/deferrable-views",
"//adev/src/content/tutorials/first-app",
"//adev/src/content/tutorials/learn-angular",
"//adev/src/content/tutorials/signal-forms",
"//adev/src/content/tutorials/signals",
] + glob(
["src/**/*"],
exclude = ["src/**/*.spec.ts"],
)
APPLICATION_DEPS = [
"//adev:node_modules/@angular-devkit/build-angular",
"//adev:node_modules/@codemirror/autocomplete",
"//adev:node_modules/@codemirror/commands",
"//adev:node_modules/@codemirror/lang-angular",
"//adev:node_modules/@codemirror/lang-css",
"//adev:node_modules/@codemirror/lang-html",
"//adev:node_modules/@codemirror/lang-javascript",
"//adev:node_modules/@codemirror/lang-sass",
"//adev:node_modules/@codemirror/language",
"//adev:node_modules/@codemirror/lint",
"//adev:node_modules/@codemirror/search",
"//adev:node_modules/@codemirror/state",
"//adev:node_modules/@codemirror/view",
"//adev:node_modules/@lezer/common",
"//adev:node_modules/@lezer/highlight",
"//adev:node_modules/@lezer/javascript",
"//adev:node_modules/@stackblitz/sdk",
"//adev:node_modules/@typescript/vfs",
"//adev:node_modules/@webcontainer/api",
"//adev:node_modules/@xterm/addon-fit",
"//adev:node_modules/@xterm/xterm",
"//adev:node_modules/algoliasearch",
"//adev:node_modules/angular-split",
"//adev:node_modules/fflate",
"//adev:node_modules/marked",
"//adev:node_modules/ngx-progressbar",
"//adev:node_modules/open-in-idx",
"//adev:node_modules/tailwindcss",
"//adev:node_modules/typescript",
"//adev:node_modules/xhr2",
"//adev:node_modules/@types/node",
"//adev:node_modules/@types/dom-navigation",
":node_modules/@codemirror/autocomplete",
":node_modules/@codemirror/commands",
":node_modules/@codemirror/lang-angular",
":node_modules/@codemirror/lang-css",
":node_modules/@codemirror/lang-html",
":node_modules/@codemirror/lang-javascript",
":node_modules/@codemirror/lang-sass",
":node_modules/@codemirror/language",
":node_modules/@codemirror/lint",
":node_modules/@codemirror/search",
":node_modules/@codemirror/state",
":node_modules/@codemirror/view",
":node_modules/@lezer/common",
":node_modules/@lezer/highlight",
":node_modules/@lezer/javascript",
":node_modules/@stackblitz/sdk",
":node_modules/shiki",
":node_modules/@typescript/vfs",
":node_modules/@webcontainer/api",
":node_modules/@xterm/addon-fit",
":node_modules/@xterm/xterm",
":node_modules/algoliasearch",
":node_modules/angular-split",
":node_modules/fflate",
":node_modules/marked",
":node_modules/ngx-progressbar",
":node_modules/open-in-idx",
":node_modules/tailwindcss",
":node_modules/typescript",
":node_modules/@types/dom-navigation",
# The imports below are packages that our code does not directly import, but our upstream deps import from
# these locations directly. By design, rather than hoisting these packages into the "root" node_modules the
@@ -70,32 +81,54 @@ APPLICATION_DEPS = [
# a "hoisted" location within the `.aspect_rules_js/` directories in the node_modules directory. This prevents
# the bundler from being able to find it as expected. We instead specifically provide it as a dep within bazel
# as a mechanism of "hoisting" the package for our usage by this target.
"//adev:node_modules/@algolia/client-common",
"//adev:node_modules/@algolia/requester-browser-xhr",
"//adev:node_modules/@algolia/requester-node-http",
"//adev:node_modules/@lezer/css",
"//adev:node_modules/@lezer/html",
"//adev:node_modules/@lezer/lr",
"//adev:node_modules/@lezer/sass",
"//adev:node_modules/@marijn/find-cluster-break",
"//adev:node_modules/crelt",
"//adev:node_modules/style-mod",
"//adev:node_modules/w3c-keyname",
":node_modules/@algolia/client-common",
":node_modules/@algolia/requester-browser-xhr",
":node_modules/@algolia/requester-node-http",
":node_modules/@lezer/css",
":node_modules/@lezer/html",
":node_modules/@lezer/lr",
":node_modules/@lezer/sass",
":node_modules/@marijn/find-cluster-break",
":node_modules/crelt",
":node_modules/style-mod",
":node_modules/w3c-keyname",
#
":node_modules/@shikijs/themes",
":node_modules/@shikijs/langs",
":node_modules/@shikijs/engine-oniguruma",
":node_modules/@shikijs/core",
":node_modules/@shikijs/engine-javascript",
":node_modules/@shikijs/types",
":node_modules/@shikijs/vscode-textmate",
":node_modules/hast-util-to-html",
# ":node_modules/oniguruma-to-es",
":node_modules/ccount",
":node_modules/comma-separated-tokens",
":node_modules/hast-util-whitespace",
":node_modules/html-void-elements",
# ":node_modules/oniguruma-parser",
":node_modules/property-information",
# ":node_modules/regex-recursion",
# ":node_modules/regex",
":node_modules/space-separated-tokens",
":node_modules/stringify-entities",
":node_modules/zwitch",
":node_modules/character-entities-html4",
":node_modules/character-entities-legacy",
# ":node_modules/regex-utilities",
]
TEST_FILES = APPLICATION_FILES + [
"karma.conf.js",
"test-main.ts",
] + glob(["src/**/*.spec.ts"])
TEST_FILES = APPLICATION_FILES + glob(["src/app/**/*.spec.ts"])
TEST_DEPS = [
dep
for dep in APPLICATION_DEPS
if dep != "//adev:node_modules/@types/node"
] + [
TEST_DEPS = APPLICATION_DEPS + [
":node_modules/@types/jasmine",
":node_modules/karma",
":node_modules/karma-chrome-launcher",
":node_modules/karma-jasmine",
":node_modules/karma-coverage",
":node_modules/karma-jasmine-html-reporter",
":node_modules/jasmine-core",
"@rules_browsers//browsers/chromium",
"@rules_browsers//browsers/firefox",
"//adev/tools:windows-chromium-path",
]
ng_config(name = "ng_config")
@@ -111,7 +144,7 @@ ng_application(
"NG_BUILD_PARTIAL_SSR": "1",
},
ng_config = ":ng_config",
node_modules = "//adev:node_modules",
node_modules = ":node_modules",
project_name = "angular-dev",
serve_args = [
"--port",
@@ -137,7 +170,7 @@ ng_application(
"NG_BUILD_OPTIMIZE_CHUNKS": "1",
},
ng_config = ":ng_config",
node_modules = "//adev:node_modules",
node_modules = ":node_modules",
project_name = "angular-dev",
serve_args = [
"--port",
@@ -161,10 +194,9 @@ ng_test(
"CHROMEDRIVER_BIN": "../" + "$(CHROMEDRIVER)",
},
ng_config = ":ng_config",
node_modules = "//adev:node_modules",
node_modules = ":node_modules",
project_name = "angular-dev",
toolchains = [
"@rules_browsers//browsers/chromium:toolchain_alias",
"@rules_browsers//browsers/firefox:toolchain_alias",
],
)
+3 -4
View File
@@ -17,7 +17,7 @@ git clone https://github.com/angular/angular.git
cd angular
# Install dependencies
pnpm
pnpm install
# Build and run local dev server
# NOTE: Initial build will take some time
@@ -52,8 +52,7 @@ pnpm bazel clean
pnpm bazel clean --expunge
```
## High level architecture
## High level architecture
The angular.dev website is a modern Angular application that utilizes Static Site Generation (SSG) to deliver pre-rendered, high-performance content to users.
@@ -61,4 +60,4 @@ The architecture is designed for efficiency and maintainability:
Content Sources: The documentation is sourced from two main places within the monorepo. The guides and tutorials are written in Markdown files, while the API reference pages are automatically generated by extracting documentation directly from the TypeScript source code of the Angular framework packages.
Build Process: During the build process, the Markdown files are converted into HTML. Simultaneously, the API documentation is extracted from the code comments. This content is then integrated into the Angular application.
Build Process: During the build process, the Markdown files are converted into HTML. Simultaneously, the API documentation is extracted from the code comments. This content is then integrated into the Angular application.
+11 -21
View File
@@ -19,7 +19,7 @@
"build": {
"builder": "@angular/build:application",
"options": {
"externalDependencies": ["path"],
"externalDependencies": ["path", "xhr2"],
"outputMode": "static",
"outputPath": "dist",
"index": "src/index.html",
@@ -31,9 +31,9 @@
"assets": [
"src/favicon.ico",
"src/robots.txt",
"src/llms.txt",
"src/assets",
"src/context",
"src/llms.txt"
"src/assets/images/v21-event"
],
"styles": ["@angular/docs/styles/global-styles.scss", "./src/local-styles.scss"],
"scripts": [],
@@ -57,7 +57,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "angular-dev:build:production"
@@ -75,24 +75,14 @@
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "angular-dev:build"
}
},
"test": {
"builder": "@angular/build:karma",
"options": {
"tsConfig": "tsconfig.spec.json",
"include": ["src/app"],
"karmaConfig": "karma.conf.js",
"main": "test-main.ts",
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["@angular/docs/styles/global-styles.scss"],
"scripts": [],
"webWorkerTsConfig": "tsconfig.worker.json"
"builder": "@angular/build:unit-test",
"options": {
"runner": "karma",
"browsers": ["ChromeHeadlessNoSandbox"],
"include": [
"src/app/**/*.spec.ts"
]
}
}
}
+14 -2
View File
@@ -19,7 +19,20 @@
]
},
{
"source": "/**/*-[0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z][0-9A-Z].*",
"source": "assets/others/versions.json",
"headers": [
{
"key": "Cross-Origin-Resource-Policy",
"value": "cross-origin"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
}
]
},
{
"source": "/**/*-[0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_][0-9A-Za-z_].*",
"headers": [
{
"key": "Cache-Control",
@@ -56,7 +69,6 @@
"key": "Cross-Origin-Opener-Policy",
"value": "same-origin"
},
{
"key": "Cross-Origin-Embedder-Policy",
"value": "require-corp"
-85
View File
@@ -1,85 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
const {getAdjustedChromeBinPathForWindows} = require('./tools/windows-chromium-path');
process.env.CHROME_BIN = getAdjustedChromeBinPathForWindows();
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
{'reporter:jasmine-seed': ['type', JasmineSeedReporter]},
],
proxies: {
'/dummy/image': 'src/assets/images/logos/angular/angular.png',
},
client: {
clearContext: false, // leave Jasmine Spec Runner output visible in browser
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
random: true,
seed: '',
},
},
jasmineHtmlReporter: {
suppressAll: true, // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/site'),
subdir: '.',
reporters: [{type: 'html'}, {type: 'text-summary'}],
},
reporters: ['progress', 'kjhtml', 'jasmine-seed'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
// See /integration/README.md#browser-tests for more info on these args
flags: [
'--no-sandbox',
'--headless',
'--disable-gpu',
'--disable-dev-shm-usage',
'--hide-scrollbars',
'--mute-audio',
],
},
},
browsers: ['ChromeHeadlessNoSandbox'],
browserNoActivityTimeout: 60000,
singleRun: false,
restartOnFileChange: true,
});
};
// Helpers
function JasmineSeedReporter(baseReporterDecorator) {
baseReporterDecorator(this);
this.onBrowserComplete = (browser, result) => {
const seed = result.order && result.order.random && result.order.seed;
if (seed) this.write(`${browser}: Randomized with seed ${seed}.\n`);
};
this.onRunComplete = () => undefined;
}
+66 -49
View File
@@ -1,87 +1,104 @@
{
"dependencies": {
"@algolia/client-search": "5.40.1",
"@angular-devkit/build-angular": "21.0.0-next.8",
"@algolia/client-common": "5.48.0",
"@algolia/client-search": "5.48.0",
"@algolia/requester-browser-xhr": "5.48.0",
"@algolia/requester-node-http": "5.48.0",
"@angular/animations": "workspace:*",
"@angular/build": "21.0.0-next.8",
"@angular/cdk": "21.0.0-next.10",
"@angular/cli": "21.0.0-next.8",
"@angular/aria": "21.2.9",
"@angular/build": "21.2.9",
"@angular/cdk": "21.2.9",
"@angular/cli": "21.2.9",
"@angular/common": "workspace:*",
"@angular/compiler-cli": "workspace:*",
"@angular/compiler": "workspace:*",
"@angular/compiler-cli": "workspace:*",
"@angular/core": "workspace:*",
"@angular/docs": "workspace:*",
"@angular/forms": "workspace:*",
"@angular/material": "21.0.0-next.10",
"@angular/material": "21.2.9",
"@angular/platform-browser": "workspace:*",
"@angular/platform-server": "workspace:*",
"@angular/router": "workspace:*",
"@angular/ssr": "21.0.0-next.8",
"@codemirror/autocomplete": "6.19.0",
"@codemirror/commands": "6.9.0",
"@angular/ssr": "21.2.9",
"@codemirror/autocomplete": "6.20.0",
"@codemirror/commands": "6.10.1",
"@codemirror/lang-angular": "0.1.4",
"@codemirror/lang-css": "6.3.1",
"@codemirror/lang-html": "6.4.11",
"@codemirror/lang-javascript": "6.2.4",
"@codemirror/lang-sass": "6.0.2",
"@codemirror/language": "6.11.3",
"@codemirror/lint": "6.9.0",
"@codemirror/search": "6.5.11",
"@codemirror/state": "6.5.2",
"@codemirror/view": "6.38.6",
"@lezer/common": "1.3.0",
"@lezer/highlight": "1.2.2",
"@codemirror/language": "6.12.1",
"@codemirror/lint": "6.9.3",
"@codemirror/search": "6.6.0",
"@codemirror/state": "6.5.4",
"@codemirror/view": "6.39.12",
"@lezer/common": "1.5.1",
"@lezer/css": "1.3.0",
"@lezer/highlight": "1.2.3",
"@lezer/html": "1.3.13",
"@lezer/javascript": "1.5.4",
"@lezer/lr": "1.4.8",
"@lezer/sass": "1.1.0",
"@marijn/find-cluster-break": "1.0.2",
"@shikijs/core": "^3.21.0",
"@shikijs/engine-javascript": "^3.21.0",
"@shikijs/engine-oniguruma": "^3.21.0",
"@shikijs/langs": "^3.21.0",
"@shikijs/themes": "^3.21.0",
"@shikijs/types": "^3.21.0",
"@shikijs/vscode-textmate": "^10.0.2",
"@stackblitz/sdk": "1.11.0",
"@types/dom-navigation": "1.0.6",
"@types/jasmine": "5.1.12",
"@types/jasmine": "6.0.0",
"@types/jsdom": "27.0.0",
"@types/node": "24.9.1",
"@typescript/vfs": "1.6.1",
"@types/node": "24.10.11",
"@typescript/vfs": "1.6.2",
"@webcontainer/api": "1.6.1",
"@xterm/addon-fit": "0.10.0",
"@xterm/xterm": "5.5.0",
"algoliasearch": "5.40.1",
"@xterm/addon-fit": "0.11.0",
"@xterm/xterm": "6.0.0",
"algoliasearch": "5.48.0",
"angular-split": "20.0.0",
"diff": "8.0.2",
"ccount": "^2.0.1",
"character-entities-html4": "^2.1.0",
"character-entities-legacy": "^3.0.0",
"comma-separated-tokens": "^2.0.3",
"crelt": "1.0.6",
"diff": "8.0.3",
"emoji-regex": "10.6.0",
"fflate": "0.8.2",
"jasmine-core": "5.12.0",
"jsdom": "27.0.1",
"hast-util-to-html": "^9.0.5",
"hast-util-whitespace": "^3.0.0",
"html-void-elements": "^3.0.0",
"jsdom": "28.0.0",
"jasmine-core": "6.1.0",
"karma-chrome-launcher": "3.2.0",
"karma-coverage": "2.2.1",
"karma-jasmine-html-reporter": "2.1.0",
"karma-jasmine": "5.1.0",
"marked": "16.4.1",
"mermaid": "11.12.0",
"karma-jasmine-html-reporter": "2.2.0",
"marked": "17.0.1",
"mermaid": "11.12.2",
"ngx-progressbar": "14.0.0",
"open-in-idx": "0.1.1",
"playwright-core": "1.56.1",
"preact-render-to-string": "6.6.2",
"preact": "10.27.2",
"prettier": "3.6.2",
"playwright-core": "1.58.1",
"preact": "10.28.3",
"preact-render-to-string": "6.6.6",
"prettier": "3.8.1",
"property-information": "^7.1.0",
"rxjs": "7.8.2",
"shiki": "3.13.0",
"shiki": "3.22.0",
"space-separated-tokens": "^2.0.2",
"stringify-entities": "^4.0.4",
"style-mod": "4.1.3",
"tinyglobby": "0.2.15",
"tslib": "2.8.1",
"typescript": "5.9.3",
"xhr2": "0.2.1",
"zone.js": "0.15.1",
"@algolia/client-common": "5.40.1",
"@algolia/requester-browser-xhr": "5.40.1",
"@algolia/requester-node-http": "5.40.1",
"@lezer/css": "1.3.0",
"@lezer/html": "1.3.12",
"@lezer/lr": "1.4.2",
"@lezer/sass": "1.1.0",
"@marijn/find-cluster-break": "1.0.2",
"crelt": "1.0.6",
"style-mod": "4.1.3",
"w3c-keyname": "2.2.8"
"w3c-keyname": "2.2.8",
"zwitch": "^2.0.4"
},
"devDependencies": {
"autoprefixer": "10.4.21",
"autoprefixer": "10.4.24",
"karma": "~6.4.4",
"postcss": "8.5.6",
"tailwindcss": "3.4.18"
"tailwindcss": "3.4.19"
}
}
+54
View File
@@ -0,0 +1,54 @@
load("@aspect_rules_ts//ts:defs.bzl", "ts_project")
load("//adev/shared-docs:defaults.bzl", "js_binary", "js_run_binary")
package(default_visibility = ["//adev:__subpackages__"])
ts_project(
name = "generate_routes_lib",
srcs = [
"generate-routes.mts",
],
data = [
"//adev/src/assets:docs_api_manifest",
"//adev/src/content/tutorials/deferrable-views",
"//adev/src/content/tutorials/first-app",
"//adev/src/content/tutorials/learn-angular",
"//adev/src/content/tutorials/signal-forms",
"//adev/src/content/tutorials/signals",
],
tsconfig = {
"compilerOptions": {
"target": "ES2022",
"module": "nodenext",
"moduleResolution": "nodenext",
"types": ["node"],
"rootDir": ".",
"skipLibCheck": True,
},
},
deps = [
"//adev:node_modules/@angular/docs",
"//adev:node_modules/@types/node",
"//adev/shared-docs/pipeline/shared:heading",
"//adev/src/app/routing/navigation-entries",
"//adev/src/content/reference/errors:route-nav-items",
"//adev/src/content/reference/extended-diagnostics:route-nav-items",
],
)
js_binary(
name = "generate_route",
data = [
"generate-routes.mjs",
":generate_routes_lib",
"//adev/src/content:guide_files",
],
entry_point = ":generate-routes.mjs",
)
js_run_binary(
name = "run_generate_route",
outs = ["defined-routes.json"],
chdir = package_name(),
tool = ":generate_route",
)
+75
View File
@@ -0,0 +1,75 @@
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ALL_ITEMS} from '../../src/app/routing/navigation-entries/index.js';
import {getIdFromHeading} from '../../shared-docs/pipeline/shared/heading.mjs';
import {NavigationItem} from '@angular/docs';
import {writeFileSync, readFileSync} from 'fs';
import {join, resolve} from 'path';
const outputFile = 'defined-routes.json';
const contentRoot = resolve(process.cwd(), '../../src/content');
/**
* The scripts generates a list of all defined routes in the guides section and stores them
* in a JSON file. This file then used by other bazel targets to know which routes are valid.
*/
function extractRoutes(items: NavigationItem[]): string[] {
const routes: string[] = [];
for (const item of items) {
if (item.path && !item.path.startsWith('http')) {
routes.push(item.path);
if (item.contentPath) {
const content = readFileSync(join(contentRoot, `${item.contentPath}.md`), {
encoding: 'utf-8',
});
const headings = extractHeadings(content);
routes.push(
...headings.map(
(heading) => `${item.path}#${heading.toLowerCase().replace(/\s+/g, '-')}`,
),
);
}
}
if (item.children) {
routes.push(...extractRoutes(item.children));
}
}
return routes;
}
function extractHeadings(content: string): string[] {
const headings = content
.split('\n')
// Top level heading (H1) are used for the page title only
// and yes, headings can have leading spaces
.filter((line) => line.trim().startsWith('##'))
.map((line) => line.replace(/^#+\s*/, '').trim());
const stepRegex = /<docs-step[^>]*title="([^"]*)"/g;
let match;
while ((match = stepRegex.exec(content)) !== null) {
headings.push(match[1]);
}
return headings.map((heading: string) => getIdFromHeading(heading));
}
function main() {
const allRoutes: string[] = [];
allRoutes.push(...extractRoutes(ALL_ITEMS));
const uniqueRoutes = Array.from(new Set(allRoutes.filter((r) => !!r)));
console.warn('Generated routes:', JSON.stringify(uniqueRoutes, null, 2));
writeFileSync(outputFile, JSON.stringify(uniqueRoutes, null, 2));
}
main();
-112
View File
@@ -1,112 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import assert from 'node:assert';
import {execSync} from 'node:child_process';
import {existsSync, constants as fsConstants} from 'node:fs';
import {copyFile, mkdtemp, readdir, readFile, realpath, unlink, writeFile} from 'node:fs/promises';
import {tmpdir} from 'node:os';
import {join} from 'node:path';
export async function copyJsonAssets({repo, githubApi, assetsPath, destPath}) {
const buildInfoPath = join(destPath, '_build-info.json');
if (!existsSync(buildInfoPath)) {
throw new Error(`${buildInfoPath} does not exist.`);
}
assert(process.env.GITHUB_REF);
const currentBranch = process.env.GITHUB_REF;
const {sha: storedSha, branchName: storedBranch} = JSON.parse(
await readFile(buildInfoPath, 'utf-8'),
);
let downstreamBranch = currentBranch;
let latestSha = await githubApi.getShaForBranch(currentBranch);
if (
latestSha.includes('No commit') &&
currentBranch !== 'refs/heads/main' &&
currentBranch !== storedBranch
) {
// In some cases, such as when a new branch is created for a feature,
// the branch may not exist in the downstream repo. For example, during an
// exceptional minor release (e.g. FW 20.3.x and Components: 20.2.x).
// In such scenarios, we fallback to the last known branch.
latestSha = await githubApi.getShaForBranch(storedBranch);
downstreamBranch = storedBranch;
}
console.log(`Comparing ${storedSha}...${latestSha}.`);
const affectedFiles = await githubApi.getAffectedFiles(storedSha, latestSha);
const changedFiles = affectedFiles.filter((file) => file.startsWith(`${assetsPath}/`));
let shaWhenFilesChanged;
if (changedFiles.length > 0) {
console.log(
`The below files changed between ${storedSha} and ${latestSha}:\n` +
changedFiles.map((f) => '* ' + f).join('\n'),
);
const temporaryDir = await realpath(await mkdtemp(join(tmpdir(), 'copy-json-assets-')));
const execOptions = {cwd: temporaryDir, stdio: 'inherit'};
execSync('git init', execOptions);
execSync(`git remote add origin https://github.com/${repo}.git`, execOptions);
// fetch a commit
execSync(`git fetch origin ${latestSha}`, execOptions);
// reset this repository's main branch to the commit of interest
execSync('git reset --hard FETCH_HEAD', execOptions);
// get sha when files where changed
shaWhenFilesChanged = execSync(`git rev-list -1 ${latestSha} "${assetsPath}/"`, {
encoding: 'utf8',
cwd: temporaryDir,
stdio: ['ignore', 'pipe', 'ignore'],
}).trim();
// Delete existing asset files.
const apiFilesUnlink = (await readdir(destPath))
.filter((f) => f.endsWith('.json'))
.map((f) => unlink(join(destPath, f)));
await Promise.allSettled(apiFilesUnlink);
// Copy new asset files
const tempAssetsDir = join(temporaryDir, assetsPath);
const assetFilesCopy = (await readdir(tempAssetsDir)).map((f) => {
const src = join(tempAssetsDir, f);
const dest = join(destPath, f);
return copyFile(src, dest, fsConstants.COPYFILE_FICLONE);
});
await Promise.allSettled(assetFilesCopy);
console.log(`Successfully updated asset files in '${destPath}'.\n`);
} else {
console.log(`No '${assetsPath}/**' files changed between ${storedSha} and ${latestSha}.`);
}
// Write SHA to file.
await writeFile(
buildInfoPath,
JSON.stringify(
{
branchName: downstreamBranch,
sha: shaWhenFilesChanged ?? storedSha,
},
undefined,
2,
),
);
// The below command will show uncommitted changes.
// This is expected because the framework repo and component/cli might have different minors
// (e.g. during exceptional minor releases), leading to changes that need to be committed.
console.log('\nChanges: ');
execSync(`git status --porcelain`, {stdio: 'inherit'});
}
+1 -1
View File
@@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/
import {SynonymHit} from 'algoliasearch';
import {type SynonymHit} from 'algoliasearch';
/**
* List of synonyms to upload to algolia.
+22
View File
@@ -0,0 +1,22 @@
{
"compileOnSave": false,
"compilerOptions": {
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"moduleResolution": "bundler",
"preserveSymlinks": true,
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
"allowImportingTsExtensions": true,
"lib": ["ES2022"],
"types": [],
"skipLibCheck": true
}
}
+1 -1
View File
@@ -7,7 +7,7 @@
*/
import {algoliasearch} from 'algoliasearch';
import synonyms from './algolia-synonyms.mjs';
import synonyms from './algolia-synonyms.mts';
/** The name of the index being updated. */
const INDEX_NAME = 'angular_v17';
-3
View File
@@ -1,3 +0,0 @@
# Generating data for `angular.dev/api` CDK packages
This script updates the Angular CDK api JSON files stored in `adev/src/content/cdk`. This files are used to generate the [angular.dev api](https://angular.dev/api) pages for the CDK packages.
-35
View File
@@ -1,35 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {dirname, resolve as resolvePath} from 'node:path';
import {fileURLToPath} from 'node:url';
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
import {GithubClient} from '../shared/github-client.mjs';
const scriptDir = dirname(fileURLToPath(import.meta.url));
const CDK_BUILDS_REPO = 'angular/cdk-builds';
const CDK_APIS_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cdk');
async function main() {
await copyJsonAssets({
repo: CDK_BUILDS_REPO,
assetsPath: '_adev_assets',
destPath: CDK_APIS_CONTENT_PATH,
githubApi: new GithubClient(
CDK_BUILDS_REPO,
process.env.ANGULAR_CDK_BUILDS_READONLY_GITHUB_TOKEN,
'ADEV_Angular_CDK_Sources_Update',
),
});
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
-3
View File
@@ -1,3 +0,0 @@
# Generating data for `angular.dev/cli`
This script updates the Angular CLI help JSON files stored in `adev/src/content/cli/help`. This files are used to generate the [angular.dev CLI](https://angular.dev/cli) pages.
-35
View File
@@ -1,35 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {dirname, resolve as resolvePath} from 'node:path';
import {fileURLToPath} from 'node:url';
import {copyJsonAssets} from '../shared/copy-json-assets.mjs';
import {GithubClient} from '../shared/github-client.mjs';
const scriptDir = dirname(fileURLToPath(import.meta.url));
const CLI_BUILDS_REPO = 'angular/cli-builds';
const CLI_HELP_CONTENT_PATH = resolvePath(scriptDir, '../../src/content/cli/help');
async function main() {
await copyJsonAssets({
repo: CLI_BUILDS_REPO,
assetsPath: 'help',
destPath: CLI_HELP_CONTENT_PATH,
githubApi: new GithubClient(
CLI_BUILDS_REPO,
process.env.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN,
'ADEV_Angular_CLI_Sources_Update',
),
});
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
@@ -0,0 +1,15 @@
# Update cross-repository documentation assets
This script updates documentation assets from other repositories for `angular.dev`.
## Aria Packages
Updates the Angular Aria API JSON files in `adev/src/content/aria`, used for the [angular.dev API](https://angular.dev/api) pages.
## CDK Packages
Updates the Angular CDK API JSON files in `adev/src/content/cdk`, used for the [angular.dev API](https://angular.dev/api) pages.
## CLI Help Pages
Updates the Angular CLI help JSON files in `adev/src/content/cli`, used for the [angular.dev CLI](https://angular.dev/cli) pages.
@@ -0,0 +1,41 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import {execSync} from 'node:child_process';
import {join} from 'node:path';
import {updateAssets} from './update-assets.mjs';
async function main() {
await updateAssets({
repo: 'angular/aria-builds',
assetsPath: '_adev_assets',
destPath: join(import.meta.dirname, '../../src/content/aria'),
});
await updateAssets({
repo: 'angular/cdk-builds',
assetsPath: '_adev_assets',
destPath: join(import.meta.dirname, '../../src/content/cdk'),
});
await updateAssets({
repo: 'angular/cli-builds',
assetsPath: 'help',
destPath: join(import.meta.dirname, '../../src/content/cli'),
});
console.log('\n-----------------------------------------------');
console.log('Change list');
console.log('-----------------------------------------------\n');
execSync(`git status --porcelain`, {stdio: 'inherit'});
}
main().catch((err) => {
console.error(err);
process.exit(1);
});
@@ -0,0 +1,132 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
//tslint:disable:no-console
import assert from 'node:assert';
import {execSync} from 'node:child_process';
import {existsSync, constants as fsConstants} from 'node:fs';
import {
copyFile,
mkdtemp,
readdir,
readFile,
realpath,
rm,
unlink,
writeFile,
} from 'node:fs/promises';
import {tmpdir} from 'node:os';
import {join} from 'node:path';
import {GithubClient} from './github-client.mjs';
export async function updateAssets({repo, assetsPath, destPath}) {
console.log('\n-----------------------------------------------');
console.log(`Processing: ${repo}`);
console.log('-----------------------------------------------\n');
const buildInfoPath = join(destPath, '_build-info.json');
if (!existsSync(buildInfoPath)) {
throw new Error(`${buildInfoPath} does not exist.`);
}
assert(process.env.GITHUB_REF);
const currentBranch = process.env.GITHUB_REF;
const {sha: storedSha, branchName: storedBranch} = JSON.parse(
await readFile(buildInfoPath, 'utf-8'),
);
assert(process.env.ANGULAR_READONLY_GITHUB_TOKEN);
const githubApi = new GithubClient(
repo,
process.env.ANGULAR_READONLY_GITHUB_TOKEN,
'ADEV_Cross_Repo_Docs_Update',
);
let downstreamBranch = currentBranch;
let latestSha = await githubApi.getShaForBranch(currentBranch);
if (
latestSha.includes('No commit') &&
currentBranch !== 'refs/heads/main' &&
currentBranch !== storedBranch
) {
// In some cases, such as when a new branch is created for a feature,
// the branch may not exist in the downstream repo. For example, during an
// exceptional minor release (e.g. FW 20.3.x and Components: 20.2.x).
// In such scenarios, we fallback to the last known branch.
latestSha = await githubApi.getShaForBranch(storedBranch);
downstreamBranch = storedBranch;
}
console.log(`Comparing ${storedSha}...${latestSha}.`);
const affectedFiles = await githubApi.getAffectedFiles(storedSha, latestSha);
const changedFiles = affectedFiles.filter((file) => file.startsWith(`${assetsPath}/`));
let shaWhenFilesChanged;
if (changedFiles.length > 0) {
console.log(
`The below files changed between ${storedSha} and ${latestSha}:\n` +
changedFiles.map((f) => '* ' + f).join('\n'),
);
const temporaryDir = await realpath(await mkdtemp(join(tmpdir(), 'update-assets-')));
try {
const execOptions = {cwd: temporaryDir, stdio: 'inherit'};
execSync('git init', execOptions);
execSync(`git remote add origin https://github.com/${repo}.git`, execOptions);
// fetch a commit
execSync(`git fetch origin ${latestSha}`, execOptions);
// reset this repository's main branch to the commit of interest
execSync('git reset --hard FETCH_HEAD', execOptions);
// get sha when files where changed
shaWhenFilesChanged = execSync(`git rev-list -1 ${latestSha} "${assetsPath}/"`, {
encoding: 'utf8',
cwd: temporaryDir,
stdio: ['ignore', 'pipe', 'ignore'],
}).trim();
// Delete existing asset files.
const apiFilesUnlink = (await readdir(destPath))
.filter((f) => f.endsWith('.json'))
.map((f) => unlink(join(destPath, f)));
await Promise.allSettled(apiFilesUnlink);
// Copy new asset files
const tempAssetsDir = join(temporaryDir, assetsPath);
const assetFilesCopy = (await readdir(tempAssetsDir)).map((f) => {
const src = join(tempAssetsDir, f);
const dest = join(destPath, f);
return copyFile(src, dest, fsConstants.COPYFILE_FICLONE);
});
await Promise.allSettled(assetFilesCopy);
} finally {
await rm(temporaryDir, {force: true, recursive: true});
}
console.log(`Successfully updated asset files in '${destPath}'.\n`);
} else {
console.log(`No '${assetsPath}/**' files changed between ${storedSha} and ${latestSha}.`);
}
// Write SHA to file.
await writeFile(
buildInfoPath,
JSON.stringify(
{
branchName: downstreamBranch,
sha: shaWhenFilesChanged ?? storedSha,
},
undefined,
2,
),
);
}
+1
View File
@@ -20,6 +20,7 @@ ts_project(
"//adev/shared-docs/components/search-dialog",
"//adev/shared-docs/components/select",
"//adev/shared-docs/components/slide-toggle",
"//adev/shared-docs/components/tab-group",
"//adev/shared-docs/components/table-of-contents",
"//adev/shared-docs/components/text-field",
"//adev/shared-docs/components/top-level-banner",
@@ -1,52 +1,52 @@
<!-- Algolia logo -->
<svg
id="Layer_1"
class="docs-algolia-logo"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 2196.2 500"
id="Layer_1"
class="docs-algolia-logo"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 2196.2 500"
>
<defs>
<style>
.cls-1,
.cls-2 {
fill: #003dff;
}
.cls-2 {
fill-rule: evenodd;
}
</style>
</defs>
<path
class="cls-2"
d="M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
/>
<rect class="cls-1" x="1845.88" y="104.73" width="62.58" height="277.9" rx="5.9" ry="5.9" />
<path
class="cls-2"
d="M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"
/>
<path
class="cls-2"
d="M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
/>
<path
class="cls-2"
d="M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"
/>
<path
class="cls-2"
d="M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
/>
<path
class="cls-2"
d="M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
/>
<path
class="cls-2"
d="M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"
/>
<path
class="cls-1"
d="M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"
/>
<defs>
<style>
.cls-1,
.cls-2 {
fill: #003dff;
}
.cls-2 {
fill-rule: evenodd;
}
</style>
</defs>
<path
class="cls-2"
d="M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
/>
<rect class="cls-1" x="1845.88" y="104.73" width="62.58" height="277.9" rx="5.9" ry="5.9" />
<path
class="cls-2"
d="M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"
/>
<path
class="cls-2"
d="M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"
/>
<path
class="cls-2"
d="M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"
/>
<path
class="cls-2"
d="M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
/>
<path
class="cls-2"
d="M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"
/>
<path
class="cls-2"
d="M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"
/>
<path
class="cls-1"
d="M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"
/>
</svg>

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Some files were not shown because too many files have changed in this diff Show More