When running my project locally with ng serve
, I want to execute some different code blocks than when I run the prject on my server (we have a DEV, STAGING and a PROD environment on the server.)
So I need to check if I'm currently running on
LOCAL,
or on DEV, STAGING, PROD.
Here How to check if Angular application running in Production or Development mode are answers to how to check, if the project is running in DEV or PROD Mode (e.g. with isDevMode
). So it would only help if I needed to check if I'm running on
LOCAL, DEV, STAGING,
or on PROD.