14062 Commits

Author SHA1 Message Date
Lukas Matta 2edc82abe0 fix(migrations): Do not remove a template if it is referenced even with a trailing semilocon
This commit fixes a behavior where under certain conditions, the migration script ignored
a template reference with a trailing semicolon and incorrectly removed the definition
of a referenced template.

Fixes #64741

(cherry picked from commit 64cb08529d)
2025-10-29 10:51:00 +01:00
Shuaib Hasan Akib 385bcbc2c0 refactor(router): remove redundant default value from routerOutletData input
Since `input()` defaults to `undefined`, the explicit initializer was unnecessary.
This improves clarity and reduces boilerplate.

(cherry picked from commit 8291760f9b)
2025-10-28 10:24:26 +01:00
Matt Lewis ca3fd7847f fix(core): Clear lView from IcuIteratorState when stack is empty to prevent memory leak
If a component template contains an icu expression it is being retained until the next change detection cycle for that template. This results in a net retention of only ever a single copy of the given lView but that creates an opportunity for compounding leaks.

Change the icu i18n_icu_container_visitor to free the IcuIteratorState retained lView when the stack is empty so that garbage collection can occur when the view is discarded.

(cherry picked from commit 59e648913c)
2025-10-27 19:42:21 +01:00
SkyZeroZx 5ce9d881e3 docs: Adds guide links to HTTP API docs for better discoverability
(cherry picked from commit c5e6b8bdc8)
2025-10-27 09:25:59 +01:00
Alan Agius 6daabb08e6 Revert "build: refactor location of best-practices.md"
This reverts commit 07a51872d5.

(cherry picked from commit 620e2c4926)
2025-10-24 19:02:41 +02:00
SkyZeroZx 020f17694b feat(common): Blocks IPv6 localhost from preconnect checks
Prevents unnecessary preconnect warnings by adding IPv6 loopback ('[::1]') to the blocklist.

(cherry picked from commit a3639e2258)
2025-10-24 18:46:47 +02:00
SkyZeroZx 752986bfc2 refactor(common): Add missing OnDestroy interface in PreconnectLinkChecker
The OnDestroy interface was implemented but not declared; this adds the missing interface declaration

(cherry picked from commit 207baad322)
2025-10-24 18:46:47 +02:00
Andrew Scott 4b318d0cc0 fix(zone.js): Support jasmine v6
This fixes the jasmine patch to ensure we are patching the private APIs
off of the right location, which changed in v6.

see https://github.com/jasmine/jasmine/commit/168ff0a751b6280b170ce097410d77a4c7c1f449

(cherry picked from commit 48abe007d9)
2025-10-24 18:46:08 +02:00
Alan Agius 18c70315d7 build: refactor location of best-practices.md
This commit moves the best-practices.md file from adev/src/context to packages/core/resources. The BUILD.bazel files and other configuration files have been updated to reflect this change.

(cherry picked from commit 07a51872d5)
2025-10-24 18:45:35 +02:00
SkyZeroZx 50d2670495 docs: Add router config options (#64529)
PR Close #64529
2025-10-23 12:34:57 +02:00
Andrew Scott bfa53cdd3f fix(router): handle parenthesized outlets without a name in DefaultUrlSerializer (#64507)
Previously, the `DefaultUrlSerializer` would incorrectly parse URLs with a parenthesized outlet that did not have a name, such as `/(left)`. This would result in an `undefined` outlet name in the serialized URL.

This commit fixes the issue by ensuring that parenthesized outlets without a name are treated as primary outlets.

fixes #58516. Based on the description, either the URL was constructed
manually or by custom serializer.

PR Close #64507
2025-10-23 12:33:58 +02:00
Andrew Scott 2a249b742c refactor(zone.js): Improve missing proxy zone error for jest imported (#64497)
test functions

This improves the fakeAsync error message when importing it, describe,
etc from jest

We will not be further expanding the ZoneJS patches to support
additional use-cases.

fixes #47603

PR Close #64497
2025-10-22 23:26:24 +00:00
Jessica Janiuk 2fad4d4ab6 fix(core): prevent duplicate nodes from being retained with fast animate.leave` calls (#64592)
We were clearing duplicate nodes when `animate.enter` fired fast, but not when solely `animate.leave` is fired and rapid toggles occur. This ensures that the `cancelLeavingNodes` function is called in all cases instead of just enter animations.

fixes: #64581

PR Close #64592
2025-10-22 19:07:35 +00:00
Jessica Janiuk 4c89a267c3 fix(core): pass element removal property through in all locations (#64565)
The `requireSynchronousElementRemoval` property was not being passed in all the locations it was needed. This was preventing leave animation timing from behaving properly in some cases.

fixes: #64525

PR Close #64565
2025-10-21 18:08:34 +00:00
JoostK bd38cd45a5 fix(animations): account for Element.animate exceptions (#64506)
In certain scenarios `Element.animate` fails, manifesting in an exception (Firefox)
or a null return value (Chromium). The null value is not conform WebIDL but handled
gracefully in this commit regardless.

Closes #64486

PR Close #64506
2025-10-21 16:49:43 +00:00
Jessica Janiuk 139b622957 refactor(core): clarify comments on enter animation queuing (#64550)
This just updates the comments and adds some tests to verify some of the queuing behavior for enter animations.

PR Close #64550
2025-10-21 15:17:14 +00:00
SkyZeroZx b0551419cd refactor(core): Removes unused trigger parameter from scheduleDelayedPrefetching (#64517)
Simplifies delayed prefetching calls by eliminating an unnecessary trigger argument

PR Close #64517
2025-10-21 15:16:40 +00:00
SkyZeroZx 9b494c7de5 docs: Add DestroyRef.destroyed and usage in lifecycle guide (#64422)
PR Close #64422
2025-10-21 15:12:50 +00:00
SkyZeroZx ed99bc96f1 docs: add references to SSR guide for caching options (#64347)
PR Close #64347
2025-10-21 15:12:15 +00:00
Andrew Scott cfd8ed3fff fix(router): Fix outlet serialization and parsing with no primary children (#64505)
this fixes tree creation, serialization, and parsing of trees created with
children outlets and no primary path

fixes #62384

PR Close #64505
2025-10-20 21:18:47 +00:00
Matthieu Riegler de8af17951 docs(docs-infra): Extract multiple extends statements for interfaces (#64539)
fixes #64528

PR Close #64539
2025-10-20 21:18:14 +00:00
Andrew Scott 182fe78f91 fix(router): Surface parse errors in Router.parseUrl (#64503)
logs error in addition to fallback parse

fixes #54937

PR Close #64503
2025-10-20 17:51:30 +00:00
Jessica Janiuk 5fb7c318bd Revert "fix(compiler-cli): missingStructuralDirective diagnostic produces false negatives (#64470)" (#64542)
This reverts commit 371274bfc6.

PR Close #64542
2025-10-20 14:39:52 +00:00
Matt Lewis 371274bfc6 fix(compiler-cli): missingStructuralDirective diagnostic produces false negatives (#64470)
Fixes a bug in the missingStructuralDirective diagnostic where structural directives with missing imports were not reported when the element using the structural directive contained other directives

Fixes #64467

PR Close #64470
2025-10-17 19:58:00 +00:00
SkyZeroZx 891f180262 fix(compiler): correctly compile long numeric HTML entities (#64297)
Fixes an issue where long numeric HTML entities (e.g. 🛈) were incorrectly compiled due to the use of 4-digit

PR Close #64297
2025-10-17 18:23:45 +00:00
Matthieu Riegler b99d028cb9 refactor(platform-browser): remove unecessary export. (#64469)
The usage has been removed from g3.

PR Close #64469
2025-10-16 18:52:54 +00:00
Jessica Janiuk 911d6822cb fix(core): update animation scheduling (#64441)
In some rare cases, it seems the animation queue disappears despite being afterEveryRender. This updates the animation scheduler to be afterNextRender instead and only schedules it when we need to.

fixes: #64423

PR Close #64441
2025-10-16 17:35:51 +00:00
SkyZeroZx 80907b20c1 docs: Fixes DI guide reference missing ')' in see tag (#64457)
PR Close #64457
2025-10-16 17:34:18 +00:00
SkyZeroZx 2d159afa1b docs: Add docs for EVENT_MANAGER_PLUGINS (#64453)
PR Close #64453
2025-10-16 14:54:48 +00:00
Matthieu Riegler 2ece42866d fix(platform-browser): DomEventsPlugin should always be the last plugin to be called for supports(). (#50394)
This fixes the issues when `BrowserModule` is not the first module imported.

Fixes #37149 #37850

PR Close #50394
2025-10-15 21:12:46 +00:00
Angular Robot 60eba9b0a4 build: update cross-repo angular dependencies (#64447)
See associated pull request for more information.

PR Close #64447
2025-10-15 21:09:30 +00:00
SkyZeroZx 68d1e290d4 docs: update service worker documentation with additional references (#64353)
PR Close #64353
2025-10-15 10:47:49 -07:00
SkyZeroZx 69dabdba99 docs: Add injection context for lazy route loading (#64412)
PR Close #64412
2025-10-15 10:41:54 -07:00
aparziale 0bf157c7fb refactor(migrations): unit test signal migration adjustment (#64393)
Move unit test from spec file to golden test

PR Close #64393
2025-10-15 10:38:58 -07:00
Matthieu Riegler 43cb583f70 refactor(devtools): add debug router APIs (#64411)
This is a patch backport of #63081

PR Close #64411
2025-10-14 15:41:11 -07:00
Andrew Kushnir 5f4f624477 Revert "refactor(core): add debug name to resource (#64172)" (#64418)
This reverts commit 63180067aa.

PR Close #64418
2025-10-14 14:28:17 -07:00
Andrew Kushnir 3ae0d1bcf5 Revert "refactor(compiler-cli): add a resource debugName transform (#64172)" (#64418)
This reverts commit e941e6b80f.

PR Close #64418
2025-10-14 14:28:17 -07:00
JoostK c2e817b0ef perf(compiler-cli): fix performance of "interpolated signal not invoked" check (#64410)
This fixes a performance regression from #63754, which is almost a revert of the
prior performance fix in #57291; the latter was provided as quick fix to address
the severe performance overhead this extended diagnostic used to have, with #57337
as follow-up change to address the false negatives that were introduced in #57291.
That follow-up never landed, though, so this commit is re-applying the changes
from #57337 to fix the performance regression.

Fixes #64403

PR Close #64410
2025-10-14 13:47:21 -07:00
Jessica Janiuk f15cfa4cc4 fix(core): fixes regression in animate.leave function bindings (#64413)
When adding and removing items in a `@for` loop, the `animate.leave` event binding instruction was not updated to use the same logic as the class function when the animation queue was added. We were not returning the correct signature for the `animate.leave` function, which caused the animation to not trigger correctly. This updates the event binding instruction to use the same logic as the class function when adding the animation to the queue.

fixes: #64336

PR Close #64413
2025-10-14 13:46:39 -07:00
Matthieu Riegler 5b0363c1ee refactor(core): warning when hydration trigger is used without hydration being enabled (#64185)
This replaces the error we were throwing before the change. This allows component with defer triggerrs to be used on both SSR'd and CSR.

fixes #64184

PR Close #64185
2025-10-14 11:55:22 -07:00
hawkgs 11b006ed83 refactor(compiler-cli): add a resource debugName transform (#64172)
Add a TS transform for `resource` (and `httpResource`) `debugName`. Test the transformations.

PR Close #64172
2025-10-14 09:31:42 -07:00
hawkgs 623c2847be refactor(core): add debug name to resource (#64172)
Decorate `resource` (and `httpResource`) with `debugName`, along with all of its internal signals.

PR Close #64172
2025-10-14 09:31:42 -07:00
Jessica Janiuk d54dd674ca fix(core): Prevents early style pruning with leave animations (#64335)
In some cases, the leave animation stylesheets were getting pruned too early due to the renderer removal happening before the animation function was run. This ensures that while queuing a leave animation, we guarantee the lView is referenced in the leaving animations set. This guarantees the style sheet pruning knows about the animations existing and skips the prune step.

fixes: #64326

PR Close #64335
2025-10-14 09:30:33 -07:00
Andrew Kushnir a2773b5ed1 ci: update symbol golden file for @defer test case (#64396)
This commit updates the golden file, which got affected by this change: https://github.com/angular/angular/commit/eb80c3075f546c43f0ed2636bc6323d4b9d0a898

PR Close #64396
2025-10-13 16:49:27 -07:00
Joey Perrott f23df716a8 build: update symbol extractor tests to stabalize the order of the symbols listed (#64389)
Update to ensure that the symbols in the list of extracted symbols is consistent even when multiple bundle files are extracted from.

PR Close #64389
2025-10-13 11:12:56 -07:00
Matthieu Riegler b4b19b60af refactor(compiler): Improve pipe in track expression error (#64321)
Throw a parse error for a better context awareness.

fixes #64316

PR Close #64321
2025-10-13 08:59:57 -07:00
aparziale 554573e524 fix(migrations): migrating input with more than 1 usage in a method (#64367)
When the migration command was run for inputs, if the input had more than one reference in a method the migration would generate incorrect code

Fixes #63018

PR Close #64367
2025-10-13 08:37:11 -07:00
SkyZeroZx 56270c36e5 docs: Documents utility functions for narrowing form control types (#64373)
PR Close #64373
2025-10-13 08:32:30 -07:00
SkyZeroZx 7cc6af9ae7 docs: Add example Unhandled errors in Angular documentation (#64356)
PR Close #64356
2025-10-13 08:30:26 -07:00
Shuaib Hasan Akib 1502b1bc82 refactor(common): sync examples with Angular style guide (#64167)
Updated examples to align with the latest Angular style:
- Removed `standalone: false` since it is unnecessary.
- Dropped module-based implementation in favor of standalone.

PR Close #64167
2025-10-13 08:29:44 -07:00