I'm using angular-cli
(beta 26). For local development it's great, but I'm struggling to see how it can fit into a more serious "build once, deploy many" type of pipeline?
I'm using the built-in concept of an environment
to store environment specific information, e.g. connection strings. But I'm required to specify the environment at build time, by using ng build --environment=xyz
. This basically means I have to do a fresh build for every deployment. Idealy I'd like to select my environment at runtime (much like can be done with ASP.NET Core for example).
Am I missing something here? Is there another way to solve this problem?
This was quite thoroughly discussed in the https://github.com/angular/angular-cli/issues/3855#issuecomment-274803729. Probably you know the answer already, but since it's not linked here I'm posting so anyone can see it.
Basically angular-cli environments are designed to be build-connected, so we have to custom-load e.g. a json file with runtime config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With