2025-01-23 11:20:23 +01:00
|
|
|
import {NgModule} from '@angular/core';
|
|
|
|
import {BrowserModule} from '@angular/platform-browser';
|
2025-01-23 11:10:23 +01:00
|
|
|
|
2025-01-23 11:20:23 +01:00
|
|
|
import {AppRoutingModule} from './app-routing.module';
|
2025-01-31 08:27:13 +01:00
|
|
|
import {AppComponent} from './components/app.component';
|
|
|
|
import {HelloComponent} from './components/hello/hello.component';
|
2025-01-25 10:28:15 +01:00
|
|
|
import {BASE_PATH} from '../gen';
|
|
|
|
import {environment} from '../environments/environment';
|
2025-01-31 08:51:45 +01:00
|
|
|
import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
2025-01-31 08:27:13 +01:00
|
|
|
import { LoginComponent } from './components/login/login.component';
|
|
|
|
import {FormsModule} from '@angular/forms';
|
2025-01-31 08:51:45 +01:00
|
|
|
import {RequestInterceptor} from './interceptors/request.interceptor';
|
|
|
|
import {UnauthorizedInterceptor} from './interceptors/unauthorizedResponseInterceptor';
|
2025-01-23 11:10:23 +01:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
declarations: [
|
2025-01-23 11:20:23 +01:00
|
|
|
AppComponent,
|
2025-01-31 08:27:13 +01:00
|
|
|
HelloComponent,
|
|
|
|
LoginComponent
|
2025-01-23 11:10:23 +01:00
|
|
|
],
|
|
|
|
imports: [
|
|
|
|
BrowserModule,
|
2025-01-23 11:20:23 +01:00
|
|
|
AppRoutingModule,
|
2025-01-31 08:27:13 +01:00
|
|
|
FormsModule
|
2025-01-23 11:10:23 +01:00
|
|
|
],
|
2025-01-25 10:28:15 +01:00
|
|
|
providers: [
|
|
|
|
{provide: BASE_PATH, useValue: environment.apiBasePath},
|
2025-01-31 08:51:45 +01:00
|
|
|
{provide: HTTP_INTERCEPTORS, useClass: UnauthorizedInterceptor, multi: true},
|
|
|
|
{provide: HTTP_INTERCEPTORS, useClass: RequestInterceptor, multi: true},
|
2025-01-25 10:28:15 +01:00
|
|
|
provideHttpClient(withInterceptorsFromDi())
|
|
|
|
],
|
2025-01-23 11:10:23 +01:00
|
|
|
bootstrap: [AppComponent]
|
|
|
|
})
|
2025-01-23 11:20:23 +01:00
|
|
|
export class AppModule {
|
|
|
|
}
|