This commit is contained in:
@@ -7,20 +7,13 @@ import {HTTP_INTERCEPTORS, provideHttpClient, withFetch, withInterceptorsFromDi}
|
|||||||
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
|
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
|
||||||
import {provideMomentDateAdapter} from "@angular/material-moment-adapter";
|
import {provideMomentDateAdapter} from "@angular/material-moment-adapter";
|
||||||
import {MAT_SNACK_BAR_DEFAULT_OPTIONS} from "@angular/material/snack-bar";
|
import {MAT_SNACK_BAR_DEFAULT_OPTIONS} from "@angular/material/snack-bar";
|
||||||
import {AuthGuard} from "./authentication/authguard";
|
|
||||||
import {TokenInterceptor} from "./authentication/tokenInterceptor";
|
|
||||||
import {ErrorInterceptor} from "./authentication/errorInterceptor";
|
|
||||||
import {provideNgxMask} from "ngx-mask";
|
import {provideNgxMask} from "ngx-mask";
|
||||||
import {UserService} from './authentication/user.service';
|
|
||||||
import {provideAnimations} from "@angular/platform-browser/animations";
|
import {provideAnimations} from "@angular/platform-browser/animations";
|
||||||
import {AuthInterceptor} from "./auth/auth.interceptor";
|
import {AuthInterceptor} from "./auth/auth.interceptor";
|
||||||
|
|
||||||
export const appConfig: ApplicationConfig = {
|
export const appConfig: ApplicationConfig = {
|
||||||
providers: [
|
providers: [
|
||||||
provideAppInitializer(() => {
|
|
||||||
const userService = inject(UserService);
|
|
||||||
userService.initializeUser();
|
|
||||||
}),
|
|
||||||
provideZoneChangeDetection({eventCoalescing: true}),
|
provideZoneChangeDetection({eventCoalescing: true}),
|
||||||
provideRouter(routes),
|
provideRouter(routes),
|
||||||
provideClientHydration(),
|
provideClientHydration(),
|
||||||
@@ -28,9 +21,7 @@ export const appConfig: ApplicationConfig = {
|
|||||||
provideAnimations(),
|
provideAnimations(),
|
||||||
provideMomentDateAdapter(undefined, {useUtc: false}),
|
provideMomentDateAdapter(undefined, {useUtc: false}),
|
||||||
{ provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 2500}},
|
{ provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 2500}},
|
||||||
AuthGuard,
|
|
||||||
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
|
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
|
||||||
// { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
|
||||||
provideNgxMask(),
|
provideNgxMask(),
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user