ng-http-interceptor
Version:
> Http Interceptor library for Angular
63 lines • 2.29 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
import { NgModule } from "@angular/core";
import { HttpModule } from "@angular/http";
import { HTTP_INTERCEPTOR_PROVIDER, HTTP_INTERCEPTOR_NO_OVERRIDE_PROVIDER } from "./providers";
/**
* \@module
* \@description
* Library provides Http Interceptor Service for Angular 2 application
* By default overrides angular's Http service
* To keep original Http service use with {\@see HttpInterceptorModule.noOverrideHttp()}
*/
export class HttpInterceptorModule {
/**
* Keeps original Http service and adds InterceptableHttp service
* Requests made by Http service will not be intercepted - only those made by InterceptableHttp
* @return {?}
*/
static noOverrideHttp() {
return {
ngModule: HttpInterceptorNoOverrideModule
};
}
}
HttpInterceptorModule.decorators = [
{ type: NgModule, args: [{
imports: [HttpModule],
providers: [HTTP_INTERCEPTOR_PROVIDER]
},] },
];
/** @nocollapse */
HttpInterceptorModule.ctorParameters = () => [];
function HttpInterceptorModule_tsickle_Closure_declarations() {
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
HttpInterceptorModule.decorators;
/**
* @nocollapse
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
*/
HttpInterceptorModule.ctorParameters;
}
export class HttpInterceptorNoOverrideModule {
}
HttpInterceptorNoOverrideModule.decorators = [
{ type: NgModule, args: [{
imports: [HttpModule],
providers: [HTTP_INTERCEPTOR_NO_OVERRIDE_PROVIDER]
},] },
];
/** @nocollapse */
HttpInterceptorNoOverrideModule.ctorParameters = () => [];
function HttpInterceptorNoOverrideModule_tsickle_Closure_declarations() {
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
HttpInterceptorNoOverrideModule.decorators;
/**
* @nocollapse
* @type {function(): !Array<(null|{type: ?, decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>)})>}
*/
HttpInterceptorNoOverrideModule.ctorParameters;
}
//# sourceMappingURL=module.js.map