add initial Angular components, services, and routing setup

This commit is contained in:
Vincent Guillet
2025-09-24 11:31:28 +02:00
parent dfb4ac302a
commit 18f0364e26
64 changed files with 15879 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import {APP_INITIALIZER, ApplicationConfig, inject, provideZoneChangeDetection} from '@angular/core';
import {provideRouter} from '@angular/router';
import {routes} from './app.routes';
import {provideHttpClient, withInterceptors} from '@angular/common/http';
import {provideAnimationsAsync} from '@angular/platform-browser/animations/async';
import {authTokenInterceptor} from './interceptors/authToken/auth-token.interceptor';
import {AuthService} from './services/auth/auth.service';
import {catchError, firstValueFrom, of} from 'rxjs';
export const appConfig: ApplicationConfig = {
providers: [
provideZoneChangeDetection({eventCoalescing: true}),
provideRouter(routes),
provideAnimationsAsync(),
provideHttpClient(withInterceptors([
authTokenInterceptor
])
),
{
provide: APP_INITIALIZER,
multi: true,
useFactory: () => {
const auth = inject(AuthService);
return () => firstValueFrom(auth.bootstrapSession().pipe(
catchError(err => of(null))
)
);
}
}, provideAnimationsAsync()
]
};