Enable Zoneless change detection

- Increases overall app ui performance
- disable zone.js
This commit is contained in:
Clemente Raposo 2024-10-17 22:56:04 +01:00 committed by Jack Anderson
parent 7019314482
commit d845c8e483
3 changed files with 4 additions and 3 deletions

View file

@ -24,7 +24,7 @@
* the words "Supercharged by SuiteCRM".
*/
import {APP_INITIALIZER, NgModule} from '@angular/core';
import {APP_INITIALIZER, NgModule, provideExperimentalZonelessChangeDetection} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {
HTTP_INTERCEPTORS,
@ -113,6 +113,7 @@ export const initializeApp = (appInitService: AppInit) => (): Promise<any> => ap
providers: [
{provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true},
{provide: RouteReuseStrategy, useClass: AppRouteReuseStrategy},
provideExperimentalZonelessChangeDetection(),
AppInit,
{
provide: APP_INITIALIZER,

View file

@ -31,7 +31,7 @@ import '@angular/localize/init';
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
// import 'zone.js'; // Included with Angular CLI.
// tslint:disable
/**
* This file includes polyfills needed by Angular and is loaded before the app.

View file

@ -45,7 +45,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
// import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************