handling multiple applications with angular cli

后端 未结 3 1619
温柔的废话
温柔的废话 2020-12-08 23:27

I am interested in being able to bootstrap multiple applications with the angular cli.

Through the angular-cli wiki I was able to find an example https://github.com/

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 00:13

    You can use ng generate application command to create separate application. This creates 'projects' folder with environment same as base application. But there will be shared modules. How will you refer at both places? One option is to use relative path.

    This article explains with example https://medium.com/disney-streaming/combining-multiple-angular-applications-into-a-single-one-e87d530d6527

    I also found one problem with this approach. You need to lazy load sub applications from main application. For this, route path need to be specified in base app.routes.ts file. What if you want to build only base without sub applications? You need to maintain two versions of app.routes.ts file

提交回复
热议问题