34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
import {
|
|
ApplicationConfig,
|
|
provideBrowserGlobalErrorListeners,
|
|
} from '@angular/core';
|
|
import {
|
|
provideRouter,
|
|
withComponentInputBinding,
|
|
withViewTransitions,
|
|
} from '@angular/router';
|
|
import { provideHttpClient, withInterceptors } from '@angular/common/http';
|
|
import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
|
|
|
|
import { routes } from './app.routes';
|
|
import { errorInterceptor, loadingInterceptor, apiResponseInterceptor } from '@core/index';
|
|
import { TASK_DATA_SOURCE } from './features/tasks/data-access/data-sources/task-data-source.token';
|
|
import { HttpTaskDataSource } from './features/tasks/data-access/data-sources/http-task.data-source';
|
|
|
|
export const appConfig: ApplicationConfig = {
|
|
providers: [
|
|
provideBrowserGlobalErrorListeners(),
|
|
provideRouter(routes, withComponentInputBinding(), withViewTransitions()),
|
|
provideHttpClient(withInterceptors([
|
|
apiResponseInterceptor,
|
|
errorInterceptor,
|
|
loadingInterceptor,
|
|
])),
|
|
provideAnimationsAsync(),
|
|
{
|
|
provide: TASK_DATA_SOURCE,
|
|
useClass: HttpTaskDataSource,
|
|
},
|
|
],
|
|
};
|