The Environment Files
Learn about standard environment files within our application as well as other environment files we can create for our application.
We'll cover the following
The environment settings files
Within our application, we have two environment files as standard. There’s one for development,environment.ts
, and one for production, environment.prod.ts
. Both of these files can be found in the /environments
folder of our application. Within these files, we can add any environmental settings we want to access within our code.
Example
For example, we could set the main API URL. Then, in the development version, we have a development URL, which points to a dev server. And in the production environments file, the same URL points to the live product URL.
This is what the environment.ts
file could look like with an API URL for development:
Get hands-on with 1400+ tech skills courses.