JSPM

  • Created
  • Published
  • Downloads 104
  • Score
    100M100P100Q88692F
  • License MIT

Simple config file manager for angular applications.

Package Exports

  • @rxap/config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rxap/config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@rxap/config

The package provides the ability to load custom configuration objects from static or dynamic sources. Additionally the config source can be changed dependent on build environment.

Install

yarn add @rxap/config
npm install @rxap/config

Setup

Update the angular application main.ts to support @rxap/config.


// Defines a list of configuration urls.
ConfigService.Urls = ['/config/config.json'];

// Ensures that the configuration is loaded before the angular application is  started
Promise.all([ConfigService.Load()]).then(() =>
  platformBrowserDynamic()
    .bootstrapModule(AppModule)
    .catch((err) => console.error(err))
);