38441 Commits

Author SHA1 Message Date
Angular Robot bb2745ddbc build: update bazel dependencies
See associated pull request for more information.
2026-02-24 14:10:01 -08:00
Matthieu Riegler db11e74b3d refactor(vscode-extension): Add support for exhaustive type check in the syntax
`@default never` will be considered a keyword on its own.
2026-02-24 11:23:47 -08:00
Matthieu Riegler 9dc3ca44ec docs: add docs for @switch Exhaustive type checking 2026-02-24 10:53:43 -08:00
Munir Issa Said 035b151a17 docs: fix roadmap introduction text 2026-02-24 10:52:34 -08:00
Jaime Burgos 3683902234 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.
2026-02-24 10:51:33 -08:00
Doug Parker 306f367899 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.
2026-02-24 10:50:37 -08:00
Doug Parker 8af73eb324 docs(devtools): add debugging instructions
This adds instructions on how to load and debug the Angular DevTools extension in Chrome locally, including where all the relevant sources are.
2026-02-24 09:28:05 -08:00
Doug Parker fc55996b56 refactor(devtools): don't minify debug builds.
This disables esbuild minification when building DevTools in debug mode, introducing a new `//devtools:debug` flag and a `pnpm run devtools:build:chrome:dev` script to trigger it. This should make debugging a little easier.
2026-02-24 09:28:05 -08:00
Doug Parker 384341d900 feat(devtools): deploy source maps
This adds source maps to both the dev and production builds. Since this project is open source and downloaded ahead of time, there is not much negative cost to shipping source maps in production, as this can help any developers who encounter bugs related to Angular DevTools on the page.

There is a slight performance cost to both processing the `sourceMappingURL` comment _and_ actually processing the sourcemaps. Ideally, we would use linked sourcemaps all the time, as this avoids processing this and parses only a trivial comment unless the user actually opens a debugger. Unfortunately, Chrome seems to fail to load linked sourcemaps for scripts injected into the user's page (the backend script and content scripts), so these need inlined sourcemaps to work, which somewhat increases the performance cost. These scripts should be small enough to not be a major issue, but we can consider removing them in production based on signal from the community if necessary.
2026-02-24 09:28:05 -08:00
Matthieu Riegler f30ed6bbf6 refactor(http): expose withXhr to prepare for fetch by default
This commit sets up the necessary changes that would allow us to safely migrate G3 before switch to the `FetchBackend` by default.

For now the `HttpXhrBackend` is still the default backend for the `HttpClient`.
2026-02-24 09:26:26 -08:00
Matthieu Riegler bdb6ae9dbc refactor(router): remove deprecated provideRoutes function.
`provideRoutes` was deprecated in v15.

BREAKING CHANGE: `provideRoutes()` has been removed. Use `provideRouter()` or `ROUTES` as multi token if necessary.
2026-02-24 09:25:13 -08:00
Alan Agius c57ba8c6e6 docs: consolidate validation rules for Host and X-Forwarded-Host headers into a single point. 2026-02-24 09:24:30 -08:00
Matthieu Riegler 9e0acc5930 docs: improve responsiveness of the homepage
This fixes some layout issues when on mobile.
2026-02-24 09:23:39 -08:00
Shuaib Hasan Akib 8739a22d28 docs: inline documentation and remove unused references
Replaces referenced doc blocks with inline documentation,
cleans up unused referenced code, and fixes broken list formatting
2026-02-24 09:22:50 -08:00
Jens Kuehlers dea858979e docs: minor roadmap update (Ecosystem/vitest) 2026-02-24 09:22:09 -08:00
Shuaib Hasan Akib 15b51d0777 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.
2026-02-24 09:20:51 -08:00
Jessica Janiuk dba72b672c refactor(core): Update idle scheduler to respect the Idle Deadline
This updates the idle scheduler to ensure the idle deadline is respected when scheduling tasks. Otherwise the idle callback will respond to the first idle event, which may not be the most optimal time to execute the task.
2026-02-24 09:19:01 -08:00
Angular Robot 8f5214e944 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-02-24 08:59:58 -08:00
SkyZeroZx c7dc7054dc docs: Add image loader config with height parameter 2026-02-23 15:30:32 -08:00
Suguru Inatomi bedfcb5644 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
2026-02-23 15:16:52 -08:00
Matthieu Riegler fbabd092f3 docs: Add a compiler entry to the roadmap 2026-02-23 15:11:27 -08:00
Angular Robot 7ac52d8d9b build: update cross-repo angular dependencies to v21.2.0-rc.1
See associated pull request for more information.
2026-02-23 13:38:23 -08:00
Matthieu Riegler 786ef8261f fix(compiler): throw on invalid in expressions
`{{in}}` are not interpreted as `'in'` string expressions anymore.

```
<input #in /> // OK
{{in}} // throws
```

fixes #65244

BREAKING CHANGE: `in` variables will throw in template expressions.
2026-02-23 13:35:07 -08:00
marktechson 53c1a1cee7 docs: update and reformat the roadmap 2026-02-23 13:28:39 -08:00
Matthieu Riegler 488d962bc7 fix(compiler): Don't bind inputs/outputs for data- attributes
This is to improve consistency and match developer expectations. This syntax was already deprecated a long time ago.
If you want to bind a data attribute, use the `attr.` prefix (which was already supported).

BREAKING CHANGE: data prefixed attribute no-longer bind inputs nor outputs.

fixes #26406
2026-02-23 13:23:58 -08:00
Shuaib Hasan Akib 5ac1c025f9 refactor(core): remove outdated TODO comments
Cleans up TODO comments that are no longer planned

Fixes #67191
2026-02-23 10:19:53 -08:00
Matthieu Riegler a9ac7f87d7 docs: mention browser mode debugging 2026-02-23 10:19:23 -08:00
Miles Malerba 0af9e3e9ee ci: remove mmalerba from reviewers
remove mmalerba from reviewers
2026-02-23 10:18:56 -08:00
Angular Robot 9a3f5cbacc build: update pnpm to v10.30.1
See associated pull request for more information.
2026-02-23 09:12:23 -08:00
Miles Malerba 23fd8fa586 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)
2026-02-23 09:11:51 -08:00
SkyZeroZx 163dd8ee38 docs: add Route Loading Strategies section and update navigation links 2026-02-23 09:11:10 -08:00
Leon Senft 1a19d61e19 refactor(forms): clean up
* Remove unused `TValue` type parameter from `FormUiControl`
* Remove unused imports
* Remove unnecessary cast
2026-02-23 09:09:55 -08:00
Alan Agius 099b4a8bbb docs: move server-side security and host validation documentation from ssr.md to security.md. 2026-02-23 09:08:51 -08:00
Alan Agius efcf76ea61 feat(docs-infra): add hideDollar option to hide the dollar sign prefix in shell code blocks.
The dollar sign is not always required.
2026-02-23 09:08:51 -08:00
Alan Agius 75fd6c0ff2 docs: convert SSR guide's important note list to HTML <ul> for proper rendering. 2026-02-23 09:08:51 -08:00
Alan Agius 944aefe854 docs: add documentation for SSR security and host validation, including details on allowedHosts configuration
This document adds more information about `allowedHost` option
2026-02-23 09:08:51 -08:00
Jaime Burgos c89d94bd58 refactor(core): guards stringify calls with ngDevMode
The `stringify` function is only needed for debugging purposes and
should not be called in production mode.
2026-02-20 13:24:28 -08:00
SkyZeroZx 38749698d0 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
2026-02-20 13:23:23 -08:00
Jessica Janiuk d7ddebca90 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.
2026-02-20 11:02:10 -08:00
cexbrayat fe25c57a5c fix(forms): preserve parse errors when parse returns value
Fixes #67170 by keeping the errors even a value is returned from the parse function.
2026-02-20 10:28:54 -08:00
Enzo Cornand b9b5c279b4 refactor(core): enhance AnimationCallbackEvent.animationComplete signature
BREAKING CHANGE: change AnimationCallbackEvent.animationComplete signature

Fixes #65613
2026-02-20 10:04:00 -08:00
Ben Hong 13e019a1bb docs: add new debugging and troubleshooting di guide 2026-02-20 10:01:11 -08:00
splincode 66b472e2bc 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.
2026-02-20 09:40:18 -08:00
Andrew Scott 246a984a5d feat(core): add TestBed.getFixture
This adds a new method to the TestBed to retrieve the most recently created component fixture. This is useful for cases where the fixture is created in a beforeEach and needs to be accessed in a test.

If multiple fixtures have been created, this method will throw an error to prevent depending on fixture creation order.
2026-02-20 09:17:54 -08:00
Matthieu Riegler 0d652ba4da 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.
2026-02-20 09:17:01 -08:00
Matthieu Riegler b7cf37d3e1 docs: improve signal demo example 2026-02-20 09:15:31 -08:00
SkyZeroZx f90e5565e0 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.
2026-02-20 08:57:03 -08:00
Bas ten Feld 57edfaf435 docs(docs-infra): fix typo 'requiredSync' instead of 'requireSync' 2026-02-20 08:53:20 -08:00
Matthieu Riegler fc8140cff4 docs(docs-infra): remove toString from the API docs 2026-02-20 08:51:57 -08:00
Matthieu Riegler cb4cb77053 feat(core): Add migration to add ChangeDetectionStrategy.Eager where applicable
In v22, `OnPush` becomes the default strategy. To maintain the ChangeDetection behavior of exisiting apps, components without an explicit change detectino strategy will get `Eager` assigned.
2026-02-20 08:51:18 -08:00