Skip to content
Source
Sign inSign up
TanStack/query

feat(angular-query): integrate with Angular v19+ PendingTasks for whenStable() support #9666

Mergedarnoud-dv(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/9666/headmerged by arnoud-dv(GitHub profile, opens in a new tab) View on GitHub

Showing 13 changed files with 228 additions and 0 deletions (loading 10).

x
0 of 13 viewed, 13 left
2 additions and 0 deletionsdocs/framework/angular/zoneless.mdModified
View file
@@ -8,3 +8,5 @@
Among Zoneless benefits are improved performance and debugging experience. For details see the [Angular documentation](https://angular.dev/guide/zoneless).
​
> Besides Zoneless, ZoneJS change detection is also fully supported.
+​
+> When using Zoneless, ensure you are on Angular v19 or later to take advantage of the `PendingTasks` integration that keeps `ApplicationRef.whenStable()` in sync with ongoing queries and mutations.
226 additions and 0 deletionspackages/angular-query-experimental/src/__tests__/inject-mutation.test.tsModified
View file
@@ -1,4 +1,5 @@
import {
+ ApplicationRef,
Component,
Injector,
input,
@@ -466,5 +467,230 @@
}).not.toThrow()
+​
+ test('should complete mutation before whenStable() resolves', async () => {
+ const app = TestBed.inject(ApplicationRef)
+ let mutationStarted = false
+ let mutationCompleted = false