DEV Community

Discussion on: How to set up an Nx-style monorepo workspace with the Angular CLI: Part 3

Collapse
 
layzee profile image
Lars Gyrup Brink Nielsen

That's one option. Another option is to load an api-environment.json file (name doesn't matter) in main.ts before bootstrapping your Angular application and providing it as a value for an InjectionToken which is then used throughout services in your applications. Your CI/CD system can write a value to this file as part of deployment or you can make a server manage it.

Collapse
 
technbuzz profile image
Samiullah Khan

Thanks for replying, can you kindly point to me towards some resources that will help solve this problem.

Thread Thread
 
layzee profile image
Lars Gyrup Brink Nielsen • Edited

This is covered in the AOT compilation chapter of my book, Accelerating Angular Development with Ivy. Alternative strategies are covered by a few articles by other authors, including the search for Angular Continuous Delivery, and Angular feature flags or something like that. Similar problem domain.