2

I'm writing my first app with Ionic 2. I want to maintain some configuration in a local JSON file and use that config during initialization. I figured ways to use an http provider to load and parse the data. However, the Observable/subscribe pattern limits this, since the parsing happens after most of the initialization code has been fired.

How would an Ionic / Angular expert write this?

devin
  • 1,078
  • 1
  • 9
  • 23
  • please take a look at [this answer](https://stackoverflow.com/questions/39576991/ionic2-angular2-read-a-custom-config-file/39577841#39577841). By doing it like that, the config could be injected in the constructor of the `app.component.ts` file, and you can use it before the app initialization. – sebaferreras Jun 12 '17 at 05:57
  • 1
    thanks, that looks like a sensible way to configuration. Will mark it answered. – devin Jun 12 '17 at 06:04

0 Answers0