0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-18 19:33:22 +00:00
query/docs/framework/angular/zoneless.md
Arnoud 3bf9268770
feat(angular-query): integrate with Angular v19+ PendingTasks for whenStable() support (#9666)
Integrates TanStack Query for Angular with Angular's PendingTasks API to properly track
asynchronous operations, ensuring ApplicationRef.whenStable() waits for queries and
mutations to complete before resolving.

Features:
- Cross-version compatibility (Angular v16+ with graceful degradation)
- Tracks query fetchStatus and mutation isPending state
- Automatic cleanup on component destruction
- Comprehensive test coverage including edge cases

Benefits:
- Improved SSR: Server waits for data fetching before rendering
- Better testing: fixture.whenStable() properly waits for async operations
- Zoneless support: Correct change detection timing
2025-09-20 18:46:18 +02:00

569 B

id title
zoneless Zoneless Angular

Because the Angular adapter for TanStack Query is built on signals, it fully supports Zoneless!

Among Zoneless benefits are improved performance and debugging experience. For details see the Angular documentation.

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.