Configure base URL depending on environment
问题 Suppose we have Angular 4+ app that needs to be located in different relative root URLs on different environments, i.e.: http://localhost:4200/index.html for development http://prod.server.com/angular-app/index.html for production Most likely, we'd want to have that option in our environment.x.ts files: export const environment = { production: false, appRoot: "/" }; export const environment = { production: true, appRoot: "/angular-app/" }; How can we configure Angular build/runtime