Angular 2: Application Settings using the CLI Environment Option
Application wide settings can be a long conversation when starting a new application. Here are just a few questions when some of my teams started this conversation: Do we use ENV variables? What about manual bootstrap? Configuration files? Should we get them from the server? Using angular-cli & environment.ts The new angular-cli have the concept of different environments like development (dev) and production (prod). When creating a new application with the cli ng my-app and /environments folder is a part of the scaffold which contains the environment files. . ├── environment.ts ├── environment.prod.ts . . and then within the /src/app folder is and environment.ts file. Here are the contents: export const environment = { production: false }; As you might imagine, the...