For my Angular application, I have multiple environment files:
- environment.ts
- environment.dev.ts
- environment.prod.ts
Instead of duplicating default variables in each file, I want to have them shared across all environments. For example, if I define a variable 'homeUrl' only in environment.ts like this:
export const environment = {
production: false,
apiUrl: 'http://some-backend-url/',
homeUrl: '/illustrator/directory'
};
When running the application using the dev configuration, the variables from environment.dev.ts are loaded correctly, but 'homeUrl' remains undefined as it is only specified in the environment.ts file.
Is there a way to utilize default variables shared across environments without redundancy?