diff --git a/.gitignore b/.gitignore index ed2304e..204755a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .idea .DS_Store - +.vscode \ No newline at end of file diff --git a/frontend/angular.json b/frontend/angular.json index 988421e..96fc714 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -16,9 +16,6 @@ "outputPath": "dist/lf10-starter2024", "index": "src/index.html", "browser": "src/main.ts", - "polyfills": [ - "zone.js" - ], "tsConfig": "tsconfig.app.json", "assets": [ { @@ -73,10 +70,6 @@ "test": { "builder": "@angular-devkit/build-angular:karma", "options": { - "polyfills": [ - "zone.js", - "zone.js/testing" - ], "tsConfig": "tsconfig.spec.json", "assets": [ { diff --git a/frontend/bun.lock b/frontend/bun.lock index 6ccd575..5011117 100644 --- a/frontend/bun.lock +++ b/frontend/bun.lock @@ -19,7 +19,6 @@ "rxjs": "~7.8.0", "tailwindcss": "^4.0.3", "tslib": "^2.3.0", - "zone.js": "~0.14.10", }, "devDependencies": { "@angular-devkit/build-angular": "^18.2.2", diff --git a/frontend/package.json b/frontend/package.json index b7c0626..962c3f0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -26,8 +26,7 @@ "postcss": "^8.5.1", "rxjs": "~7.8.0", "tailwindcss": "^4.0.3", - "tslib": "^2.3.0", - "zone.js": "~0.14.10" + "tslib": "^2.3.0" }, "devDependencies": { "@angular-devkit/build-angular": "^18.2.2", diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 95cdffc..7acf29a 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, ChangeDetectionStrategy } from '@angular/core'; import { CommonModule } from '@angular/common'; import { RouterOutlet } from '@angular/router'; import { KeycloakAngularModule } from 'keycloak-angular'; @@ -10,6 +10,7 @@ import { KeycloakAngularModule } from 'keycloak-angular'; providers: [], templateUrl: './app.component.html', styleUrl: './app.component.css', + changeDetection: ChangeDetectionStrategy.OnPush, }) export class AppComponent { constructor() {} diff --git a/frontend/src/app/app.config.ts b/frontend/src/app/app.config.ts index 23e39b3..6fd038e 100644 --- a/frontend/src/app/app.config.ts +++ b/frontend/src/app/app.config.ts @@ -1,4 +1,4 @@ -import { APP_INITIALIZER, ApplicationConfig } from '@angular/core'; +import { APP_INITIALIZER, ApplicationConfig, provideExperimentalZonelessChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; @@ -41,6 +41,7 @@ export const appConfig: ApplicationConfig = { }, KeycloakService, provideHttpClient(withInterceptorsFromDi()), + provideExperimentalZonelessChangeDetection(), { provide: HTTP_INTERCEPTORS, useClass: KeycloakBearerInterceptor,