Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Extract generic config store idea to shared library #149

Open
pmuir opened this issue Mar 19, 2017 · 2 comments
Open

Extract generic config store idea to shared library #149

pmuir opened this issue Mar 19, 2017 · 2 comments

Comments

@pmuir
Copy link
Contributor

pmuir commented Mar 19, 2017

This is a useful concept we need for the whole platform. It should include:

  1. Code to load configs from arbitrary /_config/<name>.json files
  2. Injection by OpaqueToken and the generic config interface not just class name, to allow easy switching out inside the platform
  3. typed api to allow easy casting of types.
@jstrachan
Copy link
Contributor

jstrachan commented Mar 24, 2017

though I'm kinda liking the use of process.env.FOO to access environment variables that we can then bake in via webpack and allow them to be dynamically loaded too via an optional kind of <script src="_config/env.json"></script> we put near the top of the <html><body> so that config is loaded early and we don't have really complex startup logic

@pmuir
Copy link
Contributor Author

pmuir commented Mar 24, 2017

Let me share what I did so far into ngx-base and you can look and see what you think.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants