2019-03-19 00:13:01 +00:00
|
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
2019-08-24 20:35:31 +00:00
|
|
|
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
|
|
|
2019-03-19 00:13:01 +00:00
|
|
|
import { StoreModule } from '@ngrx/store';
|
|
|
|
import { EffectsModule } from '@ngrx/effects';
|
|
|
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
|
|
|
2019-08-24 20:35:31 +00:00
|
|
|
import { UserIdleModule } from 'angular-user-idle';
|
2019-03-19 00:13:01 +00:00
|
|
|
import { OverlayContainer } from '@angular/cdk/overlay';
|
|
|
|
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
|
|
|
import { PERFECT_SCROLLBAR_CONFIG } from 'ngx-perfect-scrollbar';
|
|
|
|
import { PerfectScrollbarConfigInterface } from 'ngx-perfect-scrollbar';
|
|
|
|
|
|
|
|
const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = {
|
|
|
|
suppressScrollX: false
|
|
|
|
};
|
|
|
|
|
|
|
|
import { routing } from './app.routing';
|
|
|
|
import { SharedModule } from './shared/shared.module';
|
|
|
|
import { ThemeOverlay } from './shared/theme/overlay-container/theme-overlay';
|
2019-08-12 01:57:49 +00:00
|
|
|
import { AppComponent } from './app.component';
|
2019-08-24 20:35:31 +00:00
|
|
|
|
|
|
|
import { environment } from '../environments/environment';
|
|
|
|
import { RTLRootReducer } from './shared/store/rtl.reducers';
|
|
|
|
import { RTLEffects } from './shared/store/rtl.effects';
|
2019-03-28 01:39:29 +00:00
|
|
|
import { CommonService } from './shared/services/common.service';
|
2019-03-19 00:13:01 +00:00
|
|
|
import { LoggerService, ConsoleLoggerService } from './shared/services/logger.service';
|
2019-08-24 20:35:31 +00:00
|
|
|
import { AuthGuard } from './shared/services/auth.guard';
|
2019-03-19 00:13:01 +00:00
|
|
|
import { AuthInterceptor } from './shared/services/auth.interceptor';
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [
|
|
|
|
BrowserModule,
|
|
|
|
BrowserAnimationsModule,
|
|
|
|
SharedModule,
|
2019-08-24 20:35:31 +00:00
|
|
|
PerfectScrollbarModule,
|
2019-03-19 00:13:01 +00:00
|
|
|
routing,
|
|
|
|
UserIdleModule.forRoot({idle: 60 * 60, timeout: 1, ping: null}),
|
2019-08-24 20:35:31 +00:00
|
|
|
StoreModule.forRoot({rtlRoot: RTLRootReducer}),
|
|
|
|
EffectsModule.forRoot([RTLEffects]),
|
|
|
|
!environment.production ? StoreDevtoolsModule.instrument() : []
|
2019-03-19 00:13:01 +00:00
|
|
|
],
|
|
|
|
declarations: [
|
2019-08-24 20:35:31 +00:00
|
|
|
AppComponent
|
2019-03-19 00:13:01 +00:00
|
|
|
],
|
|
|
|
providers: [
|
|
|
|
{ provide: LoggerService, useClass: ConsoleLoggerService },
|
|
|
|
{ provide: OverlayContainer, useClass: ThemeOverlay },
|
2019-08-24 20:35:31 +00:00
|
|
|
{ provide: PERFECT_SCROLLBAR_CONFIG, useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG },
|
|
|
|
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
|
|
|
|
AuthGuard, CommonService
|
2019-03-19 00:13:01 +00:00
|
|
|
],
|
|
|
|
bootstrap: [AppComponent]
|
|
|
|
})
|
|
|
|
export class AppModule {}
|