How environment file works in #angular in detail
▻https://hackernoon.com/how-environment-file-works-in-angular-in-detail-59a65ffaa072?source=rss-
In this article, we will see how environment.ts file works. We will create our custom config files and inject them into our application based on the mode (development or production ). It would be somewhat the same as our environment files.So let’s start with the basic template.Now let’s start by adding a config file in our project which exports an object and let’s name that as ConfigurationObject. to keep things simple I have attached only two properties to it. One property is the URL, and the other is the mode.export const ConfigurationObject :any= url:’▻http://localhost:9001', isProduction:falseLet’s create one type also which has the same definition as our Configuration object. So now our code will look something like:// this is our type export interface Configuration url:string, (...)
#development #configuration-management #front-end-development #javascript