1 import { APP_BASE_HREF } from '@angular/common';
2 import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
3 import { ErrorHandler, NgModule } from '@angular/core';
4 import { BrowserModule } from '@angular/platform-browser';
5 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7 import { ToastrModule } from 'ngx-toastr';
9 import { AppRoutingModule } from './app-routing.module';
10 import { AppComponent } from './app.component';
11 import { CephModule } from './ceph/ceph.module';
12 import { CoreModule } from './core/core.module';
13 import { ApiInterceptorService } from './shared/services/api-interceptor.service';
14 import { JsErrorHandler } from './shared/services/js-error-handler.service';
15 import { SharedModule } from './shared/shared.module';
18 declarations: [AppComponent],
22 BrowserAnimationsModule,
23 ToastrModule.forRoot({
24 positionClass: 'toast-top-right',
25 preventDuplicates: true,
33 exports: [SharedModule],
36 provide: ErrorHandler,
37 useClass: JsErrorHandler
40 provide: HTTP_INTERCEPTORS,
41 useClass: ApiInterceptorService,
45 provide: APP_BASE_HREF,
46 useValue: '/' + (window.location.pathname.split('/', 1)[1] || '')
49 bootstrap: [AppComponent]
51 export class AppModule {}