Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 476b7738

Přidáno uživatelem Jakub Danek před více než 5 roky(ů)

re #37 add request interceptor for sending Basic authentication token

Zobrazit rozdíly:

webapp/src/app/app.module.ts
8 8
import {HeaderComponent} from './header/header.component';
9 9
import {MatDialogModule, MatMenuModule} from '@angular/material';
10 10
import {ProfileSettingsModule} from './profile-settings/profile-settings.module';
11
import {HttpClient, HttpClientModule} from '@angular/common/http';
11
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from '@angular/common/http';
12 12
import {EmployeesModule} from './employees/employees.module';
13 13
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
14 14
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
15 15
import {PageNotFoundComponent} from './page-not-found/page-not-found.component';
16 16
import {CommonModule} from '@angular/common';
17 17

  
18
import {BasicAuthInterceptor} from "./auth/basic-auth.interceptor";
19

  
18 20
@NgModule({
19 21
  declarations: [
20 22
    AppComponent,
......
40 42
    MatMenuModule,
41 43
    CommonModule
42 44
  ],
43
  providers: [],
45
  providers: [
46
    {provide: HTTP_INTERCEPTORS, useClass: BasicAuthInterceptor, multi: true}
47
  ],
44 48
  bootstrap: [AppComponent]
45 49
})
46 50
export class AppModule { }

Také k dispozici: Unified diff