Zoneless Angular Integration
Angular 18+ introduces support for Zoneless change detection (provideExperimentalZonelessChangeDetection()).
Because ngx-task relies entirely on Angular Signal primitives (signal(), computed()) rather than Zone.js macrotask patching, it works natively and seamlessly in Zoneless applications.
Setting Up Zoneless Angular
In your app.config.ts:
import { ApplicationConfig, provideExperimentalZonelessChangeDetection } from '@angular/core';
export const appConfig: ApplicationConfig = { providers: [ provideExperimentalZonelessChangeDetection(), ],};Why ngx-task Excel in Zoneless Apps
- Direct Signal Updates: Signal updates from
ngx-taskautomatically schedule change detection passes in Zoneless mode without requiringChangeDetectorRef.markForCheck(). - Fine-Grained DOM Updates: Template control flow (
@if (task.pending()),@if (task.result())) updates precisely the DOM nodes bound to the signals. - No Zone Pollution: Task timers (
pendingDelay,minimumPendingDuration,timeout) use nativesetTimeout/clearTimeoutwithout triggering unnecessary global Zone CD cycles.