Sharing Top Content from the Angular-sphere.

Configure an Angular App at Runtime from @juristr on @eggheadio

  • It always again happens (especially in real world scenarios) that you need to configure your Angular app at runtime.
  • That configuration might be fetched from some backend API, or it might be some simple JSON configuration sitting on your deployment server.
  • The key here is that you want to be able to dynamically modify and adjust that configuration without the need to re-compile and re-deploy your application.
  • Also, you most probably want that configuration to be loaded and ready once your application bootstrapping is done.
  • That will allow us to inject some configuration into our app just when it is about to start up.

It always again happens (especially in real world scenarios) that you need to configure your Angular app at runtime. That configuration might be fetched from some backend API, or it might be some simple JSON configuration sitting on your deployment server. The key here is that you want to be able to dynamically modify and adjust that configuration without the need to re-compile and re-deploy your application. Also, you most probably want that configuration to be loaded and ready once your application bootstrapping is done.
In this lesson we learn how to make use of the APP_INITIALIZER to hook into Angular’s initialization process. That will allow us to inject some configuration into our app just when it is about to start up.

It always again happens (especially in real world scenarios) that you need to configure your Angular app at runtime. That configuration might be fetched from some backend API, or it might be some simple JSON configuration sitting on your deployment server. The key here is that you want to be able to dynamically modify and adjust that configuration without the need to re-compile and re-deploy your application. Also, you most probably want that configuration to be loaded and ready once your application bootstrapping is done. In this lesson we learn how to make use of the

APP_INITIALIZER

to hook into Angular’s initialization process. That will allow us to inject some configuration into our app just when it is about to start up.

Configure an Angular App at Runtime from @juristr on @eggheadio