This repository has been archived on 2025-06-18. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
casino/frontend/src/app/app.config.ts
Jan Klattenhoff d3b7e7d5e7
Some checks failed
CI / Get Changed Files (pull_request) Successful in 6s
CI / prettier (pull_request) Successful in 23s
CI / Checkstyle Main (pull_request) Successful in 31s
CI / eslint (pull_request) Successful in 1m30s
CI / test-build (pull_request) Failing after 1m43s
refactor: improve type annotations in services and config
2025-04-02 16:15:31 +02:00

44 lines
1.3 KiB
TypeScript

import { ApplicationConfig, provideExperimentalZonelessChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { routes } from './app.routes';
import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
import { OAuthStorage, provideOAuthClient } from 'angular-oauth2-oidc';
import { httpInterceptor } from './shared/interceptor/http.interceptor';
/* Example of a custom storage factory - not used in the current implementation
function storageFactory() {
return new (class implements OAuthStorage {
private data: Record<string, string> = {};
getItem(key: string): string | null {
return this.data[key];
}
removeItem(key: string): void {
delete this.data[key];
}
setItem(key: string, data: string): void {
this.data[key] = data;
}
})();
}
*/
export const appConfig: ApplicationConfig = {
providers: [
provideRouter(routes),
FontAwesomeModule,
provideHttpClient(withInterceptors([httpInterceptor])),
provideExperimentalZonelessChangeDetection(),
provideAnimationsAsync(),
provideOAuthClient(),
{
provide: OAuthStorage,
useFactory: () => localStorage,
},
],
};