title: How can I check if Angular is running on production server vs localhost
body: <p>I want some variables that Angular 4 uses to be different depending on whether I am running the app on the production server or on localhost for development. How can I do this? For node.js, I use environment variables but I am not sure if it is possible to use similar environment variables for an Angular web app. What is the best way to approach setting Angular to production without explicitly setting it then deploying?</p>