1

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?

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
HOST-X
  • 185
  • 10

1 Answers1

3

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.

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
  • i guess, i see. thx. – HOST-X Jul 29 '23 at 13:01
  • 3
    To add to this ... the *ultimate* goal of signals is to allow for removal of zone.js. But those features have not yet been implemented. So as mentioned, zone.js is still required. – DeborahK Jul 31 '23 at 20:21