UNPKG

@ngx-loading-bar/http-client

Version:

Automatic page loading / progress bar for Angular

16 lines (14 loc) 2.71 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@ngx-loading-bar/core"),require("@angular/core"),require("@angular/common/http"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@ngx-loading-bar/http-client",["exports","@ngx-loading-bar/core","@angular/core","@angular/common/http","rxjs/operators"],t):t(((e=e||self)["ngx-loading-bar"]=e["ngx-loading-bar"]||{},e["ngx-loading-bar"]["http-client"]={}),e.core,e.ng.core,e.ng.common.http,e.rxjs.operators)}(this,(function(e,t,r,n,o){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */function a(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function i(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var c=function(){function e(e){this.loader=e}return e.prototype.intercept=function(e,t){if(e.headers.has("ignoreLoadingBar"))return t.handle(e.clone({headers:e.headers.delete("ignoreLoadingBar")}));var r=!1,n=this.loader.useRef("http");return t.handle(e).pipe(o.tap((function(){r||(n.start(),r=!0)})),o.finalize((function(){return r&&n.complete()})))},e.ctorParameters=function(){return[{type:t.LoadingBarService}]},e=a([r.Injectable(),i("design:paramtypes",[t.LoadingBarService])],e)}(),l=function(){function e(){}return e=a([r.NgModule({imports:[n.HttpClientModule,t.LoadingBarModule],exports:[n.HttpClientModule,t.LoadingBarModule],providers:[{provide:n.HTTP_INTERCEPTORS,useClass:c,multi:!0}]})],e)}();e.LoadingBarHttpClientModule=l,e.ɵa=c,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=ngx-loading-bar-http-client.umd.min.js.map