@dagonmetric/ng-config
Version:
Configuration and options service for Angular applications.
49 lines • 1.67 kB
JavaScript
/**
* @fileoverview added by tsickle
* Generated from: http-config/src/http-config-provider.module.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @license
* Copyright DagonMetric. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found under the LICENSE file in the root directory of this source tree.
*/
import { NgModule } from '@angular/core';
import { CONFIG_PROVIDER } from '@dagonmetric/ng-config';
import { HttpConfigProvider } from './http-config-provider';
import { HTTP_CONFIG_PROVIDER_OPTIONS } from './http-config-provider-options';
/**
* The `NGMODULE` for providing `HttpConfigProvider`.
*/
export class HttpConfigProviderModule {
/**
* Call this method to provide options for configuring the `HttpConfigProvider`.
* @param {?} options An option object for `HttpConfigProvider`.
* @return {?}
*/
static configure(options) {
return {
ngModule: HttpConfigProviderModule,
providers: [
{
provide: HTTP_CONFIG_PROVIDER_OPTIONS,
useValue: options
}
]
};
}
}
HttpConfigProviderModule.decorators = [
{ type: NgModule, args: [{
providers: [
{
provide: CONFIG_PROVIDER,
useClass: HttpConfigProvider,
multi: true
}
]
},] }
];
//# sourceMappingURL=http-config-provider.module.js.map