diff --git a/frontend/src/app/app.config.ts b/frontend/src/app/app.config.ts deleted file mode 100644 index fb79305..0000000 --- a/frontend/src/app/app.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {ApplicationConfig, provideZoneChangeDetection} from '@angular/core'; -import {provideRouter} from '@angular/router'; -import {CookieService} from 'ngx-cookie-service'; - -import {routes} from './app.routes'; -import {provideHttpClient, withInterceptors} from '@angular/common/http'; -import {authInterceptor} from '@services/AuthInterceptor'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideZoneChangeDetection({eventCoalescing: true}), - provideRouter(routes), - CookieService, - provideHttpClient( - withInterceptors([authInterceptor]) - ), - ] -}; diff --git a/frontend/src/main.ts b/frontend/src/main.ts index e2955f9..3fc718f 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -2,15 +2,19 @@ import {bootstrapApplication} from '@angular/platform-browser'; import {AppComponent} from './app/app.component'; import {provideRouter} from '@angular/router'; import {routes} from './app/app.routes'; -import {provideHttpClient} from '@angular/common/http'; -import {BASE_PATH} from './api'; -import {environment} from './environments/environment'; +import {provideHttpClient, withInterceptors} from '@angular/common/http'; +import {BASE_PATH} from '@api'; +import {environment} from '@environment'; +import {authInterceptor} from '@services/AuthInterceptor'; bootstrapApplication(AppComponent, { providers: [ provideRouter(routes), provideHttpClient(), - {provide: BASE_PATH, useValue: environment.apiUrl} + {provide: BASE_PATH, useValue: environment.apiUrl}, + provideHttpClient( + withInterceptors([authInterceptor]) + ), ] }).catch(err => console.error(err));