|
|
|
@@ -1,26 +1,27 @@ |
|
|
|
import { NgModule } from '@angular/core'; |
|
|
|
import { BrowserModule } from '@angular/platform-browser'; |
|
|
|
import { ReactiveFormsModule } from '@angular/forms'; |
|
|
|
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; |
|
|
|
import {NgModule} from '@angular/core'; |
|
|
|
import {BrowserModule} from '@angular/platform-browser'; |
|
|
|
import {ReactiveFormsModule} from '@angular/forms'; |
|
|
|
import {HttpClientModule, HTTP_INTERCEPTORS} from '@angular/common/http'; |
|
|
|
|
|
|
|
// used to create fake backend |
|
|
|
import { fakeBackendProvider } from './_helpers'; |
|
|
|
import {fakeBackendProvider} from './_helpers'; |
|
|
|
|
|
|
|
import { AppRoutingModule } from './app-routing.module'; |
|
|
|
import { JwtInterceptor, ErrorInterceptor } from './_helpers'; |
|
|
|
import { AppComponent } from './app.component'; |
|
|
|
import { AlertComponent } from './_components'; |
|
|
|
import { HomeComponent } from './home'; |
|
|
|
import {AppRoutingModule} from './app-routing.module'; |
|
|
|
import {JwtInterceptor, ErrorInterceptor} from './_helpers'; |
|
|
|
import {AppComponent} from './app.component'; |
|
|
|
import {AlertComponent} from './_components'; |
|
|
|
import {HomeComponent} from './home'; |
|
|
|
import {NgbModule} from "@ng-bootstrap/ng-bootstrap"; |
|
|
|
import {ApiModule, Configuration, ConfigurationParameters} from "@app/core/api/v1"; |
|
|
|
import {environment} from "@environments/environment"; |
|
|
|
import {MatCardModule} from "@angular/material/card"; |
|
|
|
|
|
|
|
export function apiConfigFactory(): Configuration { |
|
|
|
const params: ConfigurationParameters = { |
|
|
|
basePath: environment.basePath, |
|
|
|
}; |
|
|
|
return new Configuration(params); |
|
|
|
const params: ConfigurationParameters = { |
|
|
|
basePath: environment.basePath, |
|
|
|
withCredentials: false |
|
|
|
}; |
|
|
|
return new Configuration(params); |
|
|
|
} |
|
|
|
|
|
|
|
@NgModule({ |
|
|
|
@@ -31,7 +32,7 @@ export function apiConfigFactory(): Configuration { |
|
|
|
HttpClientModule, |
|
|
|
NgbModule, |
|
|
|
AppRoutingModule, |
|
|
|
MatCardModule |
|
|
|
MatCardModule |
|
|
|
], |
|
|
|
declarations: [ |
|
|
|
AppComponent, |
|
|
|
@@ -39,12 +40,13 @@ export function apiConfigFactory(): Configuration { |
|
|
|
HomeComponent |
|
|
|
], |
|
|
|
providers: [ |
|
|
|
{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true }, |
|
|
|
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }, |
|
|
|
{provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true}, |
|
|
|
{provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true}, |
|
|
|
|
|
|
|
// provider used to create fake backend |
|
|
|
fakeBackendProvider |
|
|
|
], |
|
|
|
bootstrap: [AppComponent] |
|
|
|
}) |
|
|
|
export class AppModule { }; |
|
|
|
export class AppModule { |
|
|
|
}; |