- angular-http-cache-interceptor.git
- projects
- angular-http-cache-interceptor
- src
- lib
- http-cache-interceptor.module.ts
This file ( 878B ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
import {ModuleWithProviders, NgModule} from '@angular/core';
import {HTTP_INTERCEPTORS} from "@angular/common/http";
import { HttpCacheInterceptorInterceptor } from './http-cache-interceptor.interceptor'
import { P3X_HTTP_CACHE_CONFIG } from "./http-cache-config.token";
import { HttpCacheConfig } from "./http-cache-config";
@NgModule({
declarations: [],
imports: [
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: HttpCacheInterceptorInterceptor,
multi: true
}
],
exports: []
})
export class P3XHttpCacheInterceptorModule {
static forRoot(httpCacheConfig: HttpCacheConfig): ModuleWithProviders<P3XHttpCacheInterceptorModule> {
return {
ngModule: P3XHttpCacheInterceptorModule,
providers: [
{
provide: P3X_HTTP_CACHE_CONFIG,
useValue: httpCacheConfig
}
]
};
}
}