I want to use Angular Signals, do I have to turn of zone.js?

1.6k Views Asked by At

With Angular 16 came Signals as Developer Preview.

When i want to use Signals, do i have to turn of zone.js. And if you so, is Signals taking place the job from zone.js automaticcly?

1

There are 1 best solutions below

1
On BEST ANSWER

Signal are still hooked on the NgZone for change detection, so you'll still need zone.js if you want automatic CD.

If you want to try to go zoneless, you can use this non-public provider:

boostrapApplication(AppComponent, {providers: [{provide: NgZone, useClass: ɵNoopNgZone}]})

But, again, this will disable automatic change detection.