@ngx-config/http-loader
Version:
Loader for ngx-config that provides application settings using http
16 lines (14 loc) • 2.27 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common/http"),require("@angular/core")):"function"==typeof define&&define.amd?define("@ngx-config/http-loader",["exports","@angular/common/http","@angular/core"],t):t(((e=e||self)["ngx-config"]=e["ngx-config"]||{},e["ngx-config"]["http-loader"]={}),e.ng.common.http,e.ng.core)}(this,(function(e,t,n){"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 o(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var r=function(){function e(e,t){void 0===t&&(t="/config.json"),this.http=e,this.endpoint=t}var r,i;return e.prototype.loadSettings=function(){var e=this;return new Promise((function(t,o){n.resolveForwardRef(e.http).get(e.endpoint).subscribe(t,(function(){return o("Endpoint unreachable!")}))}))},e=function(e,t,n,o){var r,i=arguments.length,f=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)f=Reflect.decorate(e,t,n,o);else for(var c=e.length-1;c>=0;c--)(r=e[c])&&(f=(i<3?r(f):i>3?r(t,n,f):r(t,n))||f);return i>3&&f&&Object.defineProperty(t,n,f),f}([(r=0,i=n.Inject(n.forwardRef((function(){return t.HttpClient}))),function(e,t){i(e,t,r)}),o("design:paramtypes",[t.HttpClient,String])],e)}();e.ConfigHttpLoader=r,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=ngx-config-http-loader.umd.min.js.map