34225 Commits

Author SHA1 Message Date
Can Özkan a952433e64 docs: use correct link for best-practices.md (#62306)
PR Close #62306
2025-06-27 07:18:45 +00:00
Joey Perrott b84859073b build: migrate to use web test runner rules (#62292)
Migrate karma tests throughout the repo to use the new web test runner based rule instead

PR Close #62292
2025-06-26 17:19:10 +00:00
iteriani ec01599987 refactor(core): Add Constructor type to injection types (#62265)
This allows us to pass in constructors into the inject function

PR Close #62265
2025-06-26 15:55:23 +00:00
anastasiaanisimova 402eaa1c85 docs: fix deferrable views doc links (#62293)
PR Close #62293
2025-06-26 14:34:44 +00:00
arturovt 13875d0140 refactor(common): remove redundant ɵloadImpl check in client bundles (#62191)
In this commit, the conditional branching around `ɵloadImpl` is removed from client-side code, as `ɵloadImpl` is never defined in client bundles. This makes the logic simpler and improves tree-shaking, allowing the `from()` import to be dropped from the common bundle in browser builds.

PR Close #62191
2025-06-26 12:02:51 +00:00
arturovt 4def2a79de refactor(common): replace forEach with index loop for Domino compatibility (#62290)
In this commit, the use of `images.forEach` was replaced with a traditional `for (let i = 0; ...)` loop to ensure compatibility with Domino. Domino may return a custom internal data structure (e.g., a lazily evaluated query result) that does not fully support standard iteration protocols like `forEach` or `for...of`.

Naturally, this would never happen in any browser. It occurs only in unit tests when using `renderApplication()`, because Domino's `querySelectorAll` returns the following:

```js
var nodes = select(selector, context);
return nodes.item ? nodes : new NodeList(nodes);
```

In certain unit tests, it returns an object like:
`{ root: document, filter: function(e) { ... }, lastModTime: 1, done: true, cache: [] }`,
which means that the object does not have a `forEach` method.

As a result, this causes an `afterAll` error: `forEach is not a function`.

PR Close #62290
2025-06-26 12:01:36 +00:00
Jessica Janiuk c87f367f46 ci: remove artifacts job (#62291)
Remove the artifacts job.

PR Close #62291
2025-06-26 12:01:00 +00:00
Angular Robot 349719cbea build: update cross-repo angular dependencies (#62288)
See associated pull request for more information.

PR Close #62288
2025-06-26 11:43:35 +00:00
Angular Robot cd30c4d40b build: update dependency rollup to v4.44.1 (#62285)
See associated pull request for more information.

PR Close #62285
2025-06-26 10:24:27 +00:00
Jessica Janiuk f1deaba004 ci: temp add flamegraph dep to ignoredDeps (#62287)
there is a bad flamegraph release and we need to ignore it for now.

PR Close #62287
2025-06-26 09:22:44 +00:00
SkyZeroZx 3a002c2db4 docs: Update documentation httpResource with keepalive feature (#62278)
PR Close #62278
2025-06-26 08:59:00 +00:00
Angular Robot c5c9b0b4c8 build: update rules_browsers digest to 0952071 (#62279)
See associated pull request for more information.

PR Close #62279
2025-06-26 08:19:46 +00:00
Angular Robot 0a01f5b6b0 build: update cross-repo angular dependencies (#62273)
See associated pull request for more information.

PR Close #62273
2025-06-26 08:18:22 +00:00
Matthieu Riegler d3affa562f docs: add ai best practices link to first-app tutorial intro (#62140)
PR Close #62140
2025-06-26 08:13:17 +00:00
Matthieu Riegler bfb190ec87 docs: add best practices links in the learn-angular tutorial introduction. (#62139)
PR Close #62139
2025-06-26 08:12:42 +00:00
Jan Martin 556f8ebe7b release: bump Angular DevTools version to 1.0.35 (#62271)
PR Close #62271
2025-06-26 08:10:52 +00:00
lilbeqiri 85fe323c4e refactor(devtools): inject number and symbol values with injection tokens (#56898)
Handle injecting number and symbol values with injection tokens and update contributing file

PR Close #56898
2025-06-25 17:02:54 +00:00
Tristan Bastian 58aedc37d1 feat(common): add support for a custom EnvironmentInjector to NgComponentOutlet directive (#54764)
Signed-off-by: Tristan Bastian <tristan.bastian@cumulocity.com>

PR Close #54764
2025-06-25 17:02:19 +00:00
Mansi Shrivastava 7426dbbd56 refactor(common): allow HttpErrorResponse with successful status codes (#61107)
This adds the ability to mock out errors even when successful status codes are returned.

Fixes #26161

PR Close #61107
2025-06-25 17:01:18 +00:00
Rodrigo Damazio Bovendorp 61f0ba8895 docs(core): mark after{Next,Every}Render overloads as stable (#62153)
Your blog post signaled that afterNextRender and afterEveryRender
are now stable:
https://angular.love/angular-20-whats-new#Signal%20related%20APIs

However, only 1 of the overloads of those was marked as stable.

I detected this because angular-eslint errors on calls even to
to the publicApi overload - and while that should probably be
fixed on their end, your announcement wasn't specific about only
one overload being stable, so I assume this was an oversight.

angular-eslint related issue:
https://github.com/angular-eslint/angular-eslint/issues/2534

PR Close #62153
2025-06-25 17:00:19 +00:00
Kristiyan Kostadinov 089ad0ee15 fix(compiler): produce more accurate errors for interpolations (#62258)
Currently when there's a parser error in interpolated text, the compiler reports an error on the entire text node. This can be really noisy in long strings.

These changes switch to reporting the errors on the specific expressions that caused them.

PR Close #62258
2025-06-25 16:58:56 +00:00
Jessica Janiuk f1d7ac9f1a release: cut the v20.1.0-next.3 release 20.1.0-next.3 2025-06-25 18:54:13 +02:00
Jessica Janiuk b23a912abc docs: release notes for the v20.0.5 release 2025-06-25 18:47:30 +02:00
iteriani ba755830be refactor(core): Add injection primitives for shared services. (#62087)
This way, an arbitrary service can implement Angular's service requirements without a hard dependency on @angular/core

ex:

class Foo {
   bar = inject(Bar);
}

registerInjectable(Foo);

PR Close #62087
2025-06-25 14:57:57 +00:00
Matthieu Riegler 36a193139a fix(core): allow to set a resource in an error state (#62253)
A resource is error state should still remain writable.

fixes #62241

PR Close #62253
2025-06-25 13:20:42 +00:00
Angular Robot 2a1a034a11 build: update cross-repo angular dependencies (#62262)
See associated pull request for more information.

PR Close #62262
2025-06-25 13:18:55 +00:00
Jessica Janiuk 1bf1fb2ad7 ci: Update pullapprove ownership for compiler and zonejs (#62261)
This updates the zone.js owners and adds thePunderWoman to compiler approvers.

PR Close #62261
2025-06-25 12:46:40 +00:00
Matthieu Riegler 4f0126e76a docs: fix deprecation message on ngIf/ngSwitch (#62149)
fixes #62147

PR Close #62149
2025-06-25 11:22:15 +00:00
arturovt f1b8ac6150 refactor(common): move ngServerMode check outside tap() to enable tree-shaking (#62238)
In this commit, the `ngServerMode` check is moved outside the RxJS `pipe()` to ensure that server-only logic is excluded from client bundles. Previously, the `tap()` operator and its closure were always included in the output, even though `ngServerMode` was false on the client and the side effect was never triggered.

By guarding the observable chain earlier, this reduces the RxJS stack frame depth, which simplifies debugging by avoiding unnecessary operator noise in client-side stack traces.

The resulting logic is also easier to reason about and avoids evaluating `HttpResponse` instances where not needed.

PR Close #62238
2025-06-25 11:13:21 +00:00
Jannik Lassahn b489f9fa8f refactor(language-service): add methods for decoding classifications to public api (#62251)
Add methods for decoding classifications to public api for use in the
language server

PR Close #62251
2025-06-25 09:46:53 +00:00
SkyZeroZx 9791ab1b6f feat(http): Add support for fetch request cache and priority options (#61766)
Enhances Angular HttpClient requests with Fetch API cache and priority options to optimize loading and performance.

PR Close #61766
2025-06-25 09:46:21 +00:00
SkyZeroZx 73269cf5ce feat(http): add keepalive support for fetch requests in httpResource (#61833)
This commit adds support for the Fetch API's keepalive option when using httpResource with the withFetch provider

PR Close #61833
2025-06-25 09:14:26 +00:00
Matthieu Riegler 5ac5c51c1c docs: add llms context files entries (#62224)
This commit adds copilot, vscode & windsuft

PR Close #62224
2025-06-25 09:13:53 +00:00
Angular Robot 0d59bc5e38 build: update dependency node to v22.17.0 (#62256)
See associated pull request for more information.

PR Close #62256
2025-06-25 09:12:25 +00:00
Jannik Lassahn 20c1f991e6 feat(language-service): add semantic tokens for templates (#60260)
Adds support for `getEncodedSemanticClassifications` to the language service.
The service now classifies components in a template as the `class` type.

PR Close #60260
2025-06-24 16:27:46 +00:00
hawkgs 54f3571a35 fix(devtools): injector tree vis node snap/focus, vertical orientation and links (#62048)
1. Fix node coordinates origin – now X and Y represent the exact center of the node
2. Improve links – they now start and end precisely at the nodes' edges
3. Fix node click to zoom/focus/snap (thanks to 1.)
4. Fix vertical orientation links

PR Close #62048
2025-06-24 16:27:07 +00:00
Angular Robot cb97cf86d2 build: update cross-repo angular dependencies (#62247)
See associated pull request for more information.

PR Close #62247
2025-06-24 16:25:37 +00:00
Jessica Janiuk 08276b5655 Revert "test(devtools): revive cypress tests (#61972)" (#62243)
This reverts commit 75d246e03c.

PR Close #62243
2025-06-24 15:03:46 +00:00
AleksanderBodurri 75d246e03c test(devtools): revive cypress tests (#61972)
Previously these tests would run automatically when Angular DevTools lived in another repo. These files have continued to live here but have not been running automatically on each PR.

Now, these test files have been revived to run properly with our changes since the repo merge. This is a first step to reviving our e2e testing.

Next steps include writing cypress tests for new features like Injector Graph, Router tree, signals visualizations, etc.

PR Close #61972
2025-06-24 14:22:21 +00:00
arturovt c4dd258658 fix(core): avoid injecting ErrorHandler from a destroyed injector (#61886)
This commit prevents lazy injection of the internal `ErrorHandler` from a destroyed injector, as it would result in another "destroyed injector" error.

PR Close #61886
2025-06-24 14:13:34 +00:00
Gerome Grignon d3b069334f docs(core): migrate @Input examples to Signal inputs (#62070)
PR Close #62070
2025-06-24 14:11:55 +00:00
Andrew Scott 737b35b684 feat(core): Add destroyed property to EnvironmentInjector (#61951)
Similar to `DestroyRef`, this adds the `destroyed` property to
`EnvironmentInjector`. It also has the ability to register callbacks with
`onDestroy`, which throws if `destroyed` is already `true`.

This also omits the bit about whether those callbacks have executed
since I realized the property is set to `true` before executing the
callbacks.

PR Close #61951
2025-06-24 14:09:10 +00:00
hawkgs bd4e089018 refactor(devtools): use Material Symbols without fill (#62028)
Substitute the local `woff2` file with a `FILL 0` version of Material Symbols.

PR Close #62028
2025-06-24 14:07:00 +00:00
hawkgs 1b97c60835 build(devtools): fix ng-devtools source maps (#62042)
Inline the sources contents in the `js.map` files. This fixes the source maps for the dev app.

PR Close #62042
2025-06-24 14:06:25 +00:00
guimasi1 ea71a1e8cd docs: remove incorrectly listed operators in "Supported operators" table (Expression Syntax Guide) (#62092)
PR Close #62092
2025-06-24 14:04:44 +00:00
hawkgs 29223931da fix(devtools): zone.js not being loaded for dev and prod builds (#62239)
Fixes a regression from #62083 by updating the remaining script imports.

PR Close #62239
2025-06-24 14:04:04 +00:00
arturovt 7600bec71d fix(router): handle scrollRestoration error in restricted environments (#62186)
In this commit, setting `window.history.scrollRestoration` is wrapped in a try-catch block to prevent `SecurityError` exceptions in restricted contexts such as:

- sandboxed iframes
- partially navigated or inactive windows
- test runners, extensions, or content previews

If an error occurs, a runtime warning with error code [2400] is logged to the console. This avoids breaking app initialization and improves cross-browser safety.

Unfortunately, it's not possible to perform any end-to-end testing of this fix.

PR Close #62186
2025-06-24 12:24:43 +00:00
arturovt 21dfbf3ada refactor(core): drop injection context assertion in production (#62038)
Drops `assertInInjectionContext` call in production in `afterNextRender`.

PR Close #62038
2025-06-24 12:24:09 +00:00
Alan Agius 8d049f533a build: update jest monorepo to v30 (#62234)
See associated pull request for more information.

Closes #61980 as a pr takeover

PR Close #62234
2025-06-24 10:49:30 +00:00
hawkgs e3e9e37c42 refactor(devtools): improve profiler visualizations (#62215)
Improve the profiler's visualization modes visually.

PR Close #62215
2025-06-24 10:48:44 +00:00