Back to results for “Angular Signals”
Angular › Zoneless Change Detection & Zone.js

How would you migrate an existing Zone.js based Angular application toward zoneless change detection safely?

Advanced

Answer

You gradually convert components to use signals instead of plain class properties for reactive state, replace manual change detection triggers where needed, verify that any third party libraries used do not depend on Zone.js patching, and finally enable the zoneless provider once the app's state is fully signal based and tested.
// Step 1: Convert state to signals
count = signal(0);

// Step 2: Enable zoneless provider once ready
bootstrapApplication(AppComponent, {
  providers: [provideExperimentalZonelessChangeDetection()]
});
Real-world example A large enterprise Angular app migrates one feature module at a time to signals over several sprints, testing thoroughly after each module, before finally enabling zoneless change detection across the entire application.

Common follow-ups: What testing strategy helps catch bugs introduced during a zoneless migration?;What common patterns need to change most when moving away from Zone.js?