Skip to content

Commit 0dc6ca8

Browse files
committed
Enabled experimental Zoneless change detection and removed zone,js
1 parent 86cfaa5 commit 0dc6ca8

File tree

6 files changed

+216
-298
lines changed

6 files changed

+216
-298
lines changed

angular/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
"rxjs": "^7.8.1",
3838
"sweetalert2": "^11.12.2",
3939
"ts-helpers": "^1.1.2",
40-
"tslib": "^2.6.3",
41-
"zone.js": "~0.14.8"
40+
"tslib": "^2.6.3"
4241
},
4342
"devDependencies": {
4443
"@angular-devkit/build-angular": "^18.1.1",
@@ -49,7 +48,6 @@
4948
"@types/lodash-es": "^4.17.12",
5049
"@types/moment-timezone": "^0.5.30",
5150
"@types/node": "^20.11.1",
52-
"codelyzer": "^6.0.2",
5351
"jasmine-core": "~5.1.2",
5452
"jasmine-spec-reporter": "~7.0.0",
5553
"karma": "~6.4.3",

angular/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if (environment.production) {
1212
}
1313

1414
const bootstrap = () => {
15-
return platformBrowserDynamic().bootstrapModule(RootModule);
15+
return platformBrowserDynamic().bootstrapModule(RootModule, {ngZone: 'noop'});
1616
};
1717

1818
/* "Hot Module Replacement" is enabled as described on

angular/src/polyfills.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ import 'core-js/es/string';
1616
import 'core-js/es/symbol';
1717
import 'core-js/es/reflect';
1818
import { finalize } from 'rxjs/operators';
19-
import 'zone.js';

angular/src/root.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule, APP_INITIALIZER, LOCALE_ID } from '@angular/core';
1+
import { NgModule, APP_INITIALIZER, LOCALE_ID,provideExperimentalZonelessChangeDetection} from '@angular/core';
22
import { BrowserModule } from '@angular/platform-browser';
33
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
44
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
@@ -43,6 +43,7 @@ export function getCurrentLanguage(): string {
4343
],
4444
declarations: [RootComponent],
4545
providers: [
46+
provideExperimentalZonelessChangeDetection(),
4647
{ provide: HTTP_INTERCEPTORS, useClass: AbpHttpInterceptor, multi: true },
4748
{
4849
provide: APP_INITIALIZER,

angular/src/test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
22

3-
import 'zone.js/dist/long-stack-trace-zone';
4-
import 'zone.js/dist/proxy.js';
5-
import 'zone.js/dist/sync-test';
6-
import 'zone.js/dist/jasmine-patch';
7-
import 'zone.js/dist/async-test';
8-
import 'zone.js/dist/fake-async-test';
93
import { getTestBed } from '@angular/core/testing';
104
import {
115
BrowserDynamicTestingModule,

0 commit comments

Comments
 (0)