Angular Configuration
In Previous topic we have seen about Angular Observable , in this topic we will look into configuration part of our angular application. When an application starts it need some sort of runtime configuration information like UR endpoint etc. APP_INITIALIZER ➤➤➤ APP_INITIALIZER is a dependency injection token that you can use to provide one or more initialization functions. The provided functions are injected at application startup and executed during app initialization. If any of these function returns a Promise or Observable, initialization does not complete until the promise is resolved or Observable is completed. We will look into an example in which we will get some results, these results usually returned as an observable or a promise which matches exactly with the signature of APP_INITIALIZER function. So to use this service we do not need to create any new instance like Service service = new Service(); Angular will handle these through dependency injection, we ...