angular 6 - best practice of sharing common code between projects

后端 未结 2 2006
借酒劲吻你
借酒劲吻你 2020-12-16 00:31

How to share code between projects ?

I have two apps created using:

ng generate application app1

ng generate application app2

2条回答
  •  不思量自难忘°
    2020-12-16 01:05

    If the majority of Apps share the common code, I will suggest another approach using dynamic routing and lazy-loading modules. Within the same code base, you can add all App specific code into a new Module. Then you add a additional flag in the environment file, and create a new environment file, so the App can be built into different bundle by the internment configuration --c. for more details, have a look this article

提交回复
热议问题