How To Use APP_INITIALIZER

Da Feng
4 min readApr 21, 2022

To add some custom logic before application starts

Photo by Jukan Tateisi on Unsplash

Why we need it

It’s common that before an application starts, it needs to know in advance quite a few configurations, such as what’s the baseURL of http call, what's the port number etc. These configurations can also differ between defferent environtments (dev or prod). In angular we do this by putting these configuration constants…

--

--

Da Feng

I am a software developer, write blogs about Typescript, Angular, React, vue, Front-end technologies, also share some of my life stories and good memories here.