I know how to write modules in angular. But how to actually add or remove a module during ng build, based on the supplied command line params, instead of adding it in the module dependencies directly? Kind of like multiple implementations for same interface and to decide the actual implementation during build. (similar to multi modules in java) Any suggestions or advices?
2 Answers
This question does not deserve down votes, as it is valid and applicable to Angular and angular cli provides a built-in method to do this. The feature is called file-replacements.
It's documented and explained extensively here. https://angular.io/guide/build
Comments
I found the below angular page more suitable for what i was looking. I am posting it here for those you are having similar requirements. https://angular.io/guide/file-structure#multiple-projects.
1 Comment
Avin Kavish
This has no relation to your initial question. You are not asking for multiple projects. you are asking for multiple versions of the same interface.