0

I'm trying to read a config file at runtime using Angular 12. In all the example I saw, a ConfigService class is used in conjuction with the APP_INITIALIZER to read the file using http.get when the app is initialized. All of them are using toPromise() (to wait until the file has been successfully read). However, toPromise will be deprecated in the next rxjs version.

So, how can we read a config file, at runtime, and make sure that the file has been read before the application can be used without using promises?

user1861857
  • 198
  • 1
  • 8

0 Answers0