dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_BrowserInterceptorsModule cluster_BrowserInterceptorsModule_declarations cluster_BrowserInterceptorsModule_exports cluster_BrowserInterceptorsModule_providers LoaderComponent LoaderComponent BrowserInterceptorsModule BrowserInterceptorsModule LoaderComponent->BrowserInterceptorsModule LoaderComponent LoaderComponent BrowserInterceptorsModule->LoaderComponent BrowserStateInterceptor BrowserStateInterceptor BrowserStateInterceptor->BrowserInterceptorsModule HandlerErrorInterceptor HandlerErrorInterceptor HandlerErrorInterceptor->BrowserInterceptorsModule LoaderInterceptor LoaderInterceptor LoaderInterceptor->BrowserInterceptorsModule

File

projects/maplander/core/src/lib/interceptors/browser-interceptors.module.ts

Methods

Static forRoot
forRoot()
import {ModuleWithProviders, NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import {HTTP_INTERCEPTORS} from '@angular/common/http';
import {BrowserStateInterceptor} from './state/browser-state.interceptor';
import {LoaderInterceptor} from './loader/browser-loader.interceptor';
import {HandlerErrorInterceptor} from './handler-error/browser-handler-error.interceptor';
import {LoaderService} from './loader/loader.service';
import { MatCardModule } from '@angular/material/card';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import {LoaderComponent} from './loader/loader.component';

@NgModule({
  imports: [
    CommonModule,
    MatCardModule,
    MatProgressSpinnerModule
  ],
  declarations: [
    LoaderComponent
  ],
  exports: [
    LoaderComponent
  ],
  providers: [
    {
      provide: HTTP_INTERCEPTORS,
      useClass: BrowserStateInterceptor,
      multi: true
    },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: HandlerErrorInterceptor,
      multi: true
    },
    {
      provide: HTTP_INTERCEPTORS,
      useClass: LoaderInterceptor,
      multi: true
    },
  ]
})
export class BrowserInterceptorsModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: BrowserInterceptorsModule,
      providers: [
        LoaderService
      ]
    };
  }
}

result-matching ""

    No results matching ""