0

My goal is to load a configuration file (from assets) which includes settings I need for my http service. Currently I have an APP_INITIALIZER service which loads the file and sets it in the service properties. Thing is, the http service is providedIn: 'root' and Angular constructs it before the config is loaded which results in getting an undefined when trying to access the "saved" config.

How can I make sure the config will be loaded before those services are constructed?

Thanks.

Dan R.
  • 638
  • 5
  • 13

1 Answers1

0

I solved this using the 3rd method posted here:

https://netbasal.com/optimize-user-experience-while-your-angular-app-loads-7e982a67ff1a

Dan R.
  • 638
  • 5
  • 13