Commit graph

36234 commits

Author SHA1 Message Date
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