Commit graph

36863 commits

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