Commit graph

35667 commits

Author SHA1 Message Date
Angular Robot
fe581f38fd build: update pnpm to v10.25.0
See associated pull request for more information.
2025-12-10 12:36:08 -08:00
Michael Small
de6dc043fb docs: add 'new' to page 'Side effects for non-reactive APIs'
(cherry picked from commit 3ab17876ba)
2025-12-10 12:27:30 -08:00
Matthieu Riegler
f20d301bdc refactor: spread rules with glob syntax
prettierignore does not support the glob syntax for multiple extensions.

(cherry picked from commit c429e701fc)
2025-12-10 12:26:57 -08:00
Matthieu Riegler
42c89f1c98 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

This is a backport of #64863
2025-12-10 12:24:50 -08:00
SkyZeroZx
6930a2e8c8 docs: update forwardRef usage with signals and add HostListener note
(cherry picked from commit bff2dcb93c)
2025-12-10 12:23:33 -08:00
Angular Robot
68a98118d2 build: lock file maintenance
See associated pull request for more information.
2025-12-10 12:22:25 -08:00
Andrew Scott
497c0e36ab refactor(core): Add transition.to property to FakeNavigation
This matches the upstream changes in f19930f98a

(cherry picked from commit 5988bdedae)
2025-12-10 10:18:13 -08:00
diegoinost02
7fde186157 docs(forms): document array item validation in Signal Forms
(cherry picked from commit 9dd08c571a)
2025-12-10 10:17:33 -08:00
diegoinost02
8c8bd3e856 docs(forms): add signal forms documentation for validating array items
(cherry picked from commit e6865af8f1)
2025-12-10 10:17:33 -08:00
SkyZeroZx
49fca78f27 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.

(cherry picked from commit 15e3407dab)
2025-12-10 10:16:04 -08:00
Shuaib Hasan Akib
2dd971b73e 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
(cherry picked from commit 1c6049584e)
2025-12-10 10:09:41 -08:00
Matthieu Riegler
cbb10179c8 fix(forms): allow resetting with empty string
Both empty string and null values should be accepted when resetting

fixes #65949

(cherry picked from commit 14713d0992)
2025-12-10 10:04:58 -08:00
Shuaib Hasan Akib
834593b9c0 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.

(cherry picked from commit d0a34a6ca5)
2025-12-10 09:35:56 -08:00
Shuaib Hasan Akib
ac6f34a43b 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

(cherry picked from commit 1f29577077)
2025-12-10 09:31:48 -08:00
Andrew Scott
01ab257da4 refactor(core): match spec updates for FakeNavigation
Updates FakeNavigation based on updates in https://github.com/whatwg/html/pull/11952

(cherry picked from commit d355205198)
2025-12-10 08:19:28 -08:00
Matthieu Riegler
84f397c831 refactor(core): Support Error like object for on resource errors.
Error like object will be treated as errors.

Related to #61861

(cherry picked from commit 835a643161)
2025-12-10 08:18:24 -08:00
Joey Perrott
96bb4c6ae3 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

(cherry picked from commit 9ace7d7a0d)
2025-12-09 13:44:49 -08:00
Matthieu Riegler
4043ec5bdd docs: create a separate effect guide
This also includes details about `afterRenderEffect`

WIP.

fixes #63757

(cherry picked from commit 827f5a6fd5)
2025-12-09 13:11:05 -08:00
Kristiyan Kostadinov
65297c6201 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.

(cherry picked from commit 8a3f3a91cf)
2025-12-09 13:01:35 -08:00
kirjs
6d7475582f fix(forms): Reuse key in parent in compat structure
This fixes the "Compat nodes do not use keyInParent." error when trying to bind compatField.

(cherry picked from commit 179b4cba67)
2025-12-09 12:59:27 -08:00
arturovt
bb0061ba63 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.

(cherry picked from commit 80dbd74ae8)
2025-12-09 10:38:44 -08:00
Matthieu Riegler
ffad78360f refactor(core): add dedicated deprecated signatures for providedIn: any / NgModule.
Those were deprecated by #47616 back in v15.

fixes #65923

(cherry picked from commit 8199945637)
2025-12-09 10:38:14 -08:00
Angular Robot
4bfee61aa7 docs: update cross-repo adev docs
Updated Angular adev cross repo docs files.
2025-12-09 10:37:00 -08:00
Miles Malerba
f254ff4f2e 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`

(cherry picked from commit aff8b248b3)
2025-12-09 09:47:56 -08:00
Andrew Scott
91532626a9 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

(cherry picked from commit 200d923436)
2025-12-09 09:39:37 -08:00
Angular Robot
d8162373d7 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-09 09:28:32 -08:00
SkyZeroZx
5d73893219 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.

(cherry picked from commit 9a6b8e0315)
2025-12-09 09:25:34 -08:00
Kristiyan Kostadinov
f901cc9eb3 perf(compiler): chain query creation instructions
We always emit the query creation instructions in a group which makes them good candidates for chaining.

(cherry picked from commit ae1c0dc490)
2025-12-09 09:24:41 -08:00
Andrew Scott
a41b0ce025 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

(cherry picked from commit c9dfc6c484)
2025-12-09 09:23:52 -08:00
Matthieu Riegler
182116582e docs(docs-infra): prefer/avoid code block styling
fixes #65866

(cherry picked from commit 3411638f65)
2025-12-09 09:23:17 -08:00
Miles Malerba
5880fbc73c 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

(cherry picked from commit ebc5c2b083)
2025-12-09 09:21:45 -08:00
Joey Perrott
53f752e7a3 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

(cherry picked from commit 349133374f)
2025-12-09 09:19:19 -08:00
Shuaib Hasan Akib
d9522d9033 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.

(cherry picked from commit 4b9fffaa79)
2025-12-09 09:17:46 -08:00
Gouvernathor
1a4ce250e7 docs(common): Explain how ::ng-deep works
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
(cherry picked from commit 5607f513a7)
2025-12-09 09:16:51 -08:00
cexbrayat
55fc677cef 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

(cherry picked from commit 9fe9566581)
2025-12-08 10:30:48 -08:00
Anuj Chhajed
288238abef 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.

(cherry picked from commit 96b79fc393)
2025-12-08 10:30:06 -08:00
Miles Malerba
a4c436a058 refactor: followup cleanup for #65758 fallout
Fixes some issues left behind by recent refactor

(cherry picked from commit efde94a525)
2025-12-08 10:28:04 -08:00
mahmoudaboueleneen
7c82f4e410 docs: fix typo in 'components' word in host elements guide
(cherry picked from commit bad758d4ea)
2025-12-08 10:24:10 -08:00
Shuaib Hasan Akib
55709c1de6 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.

(cherry picked from commit 5fd75410a9)
2025-12-08 10:23:21 -08:00
Joey Perrott
ed7db0e0a2 build: update to bazel version 8.4.2
Update bazel to use version 8.4.2

(cherry picked from commit aa92f19307)
2025-12-08 10:22:04 -08:00
Alan Agius
f18af4b0db build: ignore adev generated content JSON files in Prettier
These files are auto generated.

(cherry picked from commit 22eda59a31)
2025-12-08 10:20:34 -08:00
Matthieu Riegler
10bdae9098 build: enable angular formatting on all html files
This should also be safe on any html file that isn't an angular template

(cherry picked from commit 9d1d742f1b)
2025-12-08 10:19:50 -08:00
Alessio Pelliccione
7f967997fb 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

(cherry picked from commit 253dc95d63)
2025-12-08 10:05:51 -08:00
Angular Robot
b2ea55c969 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-12-08 09:36:30 -08:00
SkyZeroZx
7ab88c1697 docs: add attribute binding reference in accessibility guide
(cherry picked from commit 70e024ea80)
2025-12-08 09:24:30 -08:00
Shuaib Hasan Akib
46f7986a02 docs: add missing page title to update guide
Fixes the missing page title so the update guide displays a proper heading.

(cherry picked from commit c9cba99407)
2025-12-08 09:23:28 -08:00
SkyZeroZx
3c8b3ac07b docs: Updates tutorial syntaxis highlight
(cherry picked from commit ccf31349c5)
2025-12-08 09:21:48 -08:00
Angular Robot
f253f1200d build: update bazel dependencies
See associated pull request for more information.
2025-12-08 09:13:52 -08:00
SkyZeroZx
71568e069c docs: add documentation HOST_TAG_NAME
(cherry picked from commit 6f2ef918e3)
2025-12-08 09:08:55 -08:00
Jessica Janiuk
0352d552a1 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.

(cherry picked from commit ce4ddf4b47)
2025-12-08 09:06:31 -08:00