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