I want to deploy an angular 2 app to different web app slots (let's say dev, staging and prod) using VSTS CI/CD. Each slot should point to a different web api. Normally one would specify three different environment files inside the app, but the downside is that I would have to build three times with different environments.
What I want to achieve is to have only two builds, dev and prod. The dev get's deployed to the dev slot and the prod build get's deployed to staging first and then the same build should be deployed to the production slot. I can define app settings for each slot. They are treated like environment variables.
Is there a way to read those config settings from within an angular 2 app or am I missing something else?