1

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 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.