# All files / src/app app.module.ts

100% Statements 36/36
100% Branches 3/3
100% Functions 3/3
100% Lines 30/30

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    794x
    4x
    4x
    4x
    4x

    4x
    4x
    4x
    4x
    4x
    4x
    4x

    4x
    4x
    4x
    4x
    4x
    4x
    4x
    4x

    7x
    7x
    7x
    7x
    7x
    4x

    4x
    27x

    4x

    4x
     import { registerLocaleData } from '@angular/common';
    import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
    import { ErrorHandler, NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

    import { JwtModule } from '@auth0/angular-jwt';
    import { I18n } from '@ngx-translate/i18n-polyfill';
    import { BlockUIModule } from 'ng-block-ui';
    import { ToastModule, ToastOptions } from 'ng2-toastr/ng2-toastr';
    import { AccordionModule } from 'ngx-bootstrap/accordion';
    import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
    import { TabsModule } from 'ngx-bootstrap/tabs';

    import { AppRoutingModule } from './app-routing.module';
    import { AppComponent } from './app.component';
    import { CephModule } from './ceph/ceph.module';
    import { CoreModule } from './core/core.module';
    import { i18nProviders, LocaleHelper } from './locale.helper';
    import { ApiInterceptorService } from './shared/services/api-interceptor.service';
    import { JsErrorHandler } from './shared/services/js-error-handler.service';
    import { SharedModule } from './shared/shared.module';

    export class CustomOption extends ToastOptions {
      animate = 'flyRight';
      newestOnTop = true;
      showCloseButton = true;
      enableHTML = true;
    }

    export function jwtTokenGetter() {
      return localStorage.getItem('access_token');
    }

    registerLocaleData(LocaleHelper.getLocaleData(), LocaleHelper.getLocale());

    @NgModule({
      declarations: [AppComponent],
      imports: [
        HttpClientModule,
        BlockUIModule.forRoot(),
        BrowserModule,
        BrowserAnimationsModule,
        ToastModule.forRoot(),
        AppRoutingModule,
        CoreModule,
        SharedModule,
        CephModule,
        AccordionModule.forRoot(),
        BsDropdownModule.forRoot(),
        TabsModule.forRoot(),
        JwtModule.forRoot({
          config: {
            tokenGetter: jwtTokenGetter
          }
        })
      ],
      exports: [SharedModule],
      providers: [
        {
          provide: ErrorHandler,
          useClass: JsErrorHandler
        },
        {
          provide: HTTP_INTERCEPTORS,
          useClass: ApiInterceptorService,
          multi: true
        },
        {
          provide: ToastOptions,
          useClass: CustomOption
        },
        i18nProviders,
        I18n
      ],
      bootstrap: [AppComponent]
    })
    export class AppModule {}