When building a pure SPA application like an Angular 8 app you don't have the luxury of server side rendering. This means you can't change use different environment variables in your SPA application without exposing all environments to the users.
In this post I'l show you a solution using Azure Dev Ops pipelines . We are going to deploy our code to a Dev Ops repository and start multiple builds using build chaining that's a feature of Azure Dev Ops.
After the builds have finished we are first deploying the staging build to our staging server and, after approval, deploying our Angular production build to our production server.