Angular 2 构建单个模块

Dan*_*eee 5 angular

我知道如何使用 Angular CLI 构建我的项目:ng build --prod

如何单独编译每个模块?这是我的项目:

图像

AnagAccreditamentocruscottofiliera是单独的模块,带有它们的module.ts,routing.module.ts文件。我如何单独构建它们并稍后将它们插入到我的项目中,就像它们是库一样?

Deb*_*ahK 0

如果您希望能够根据需要拉入模块,那么您需要延迟加载。您可以在此处了解如何使用延迟加载:https://angular.io/docs/ts/latest/guide/router.html# !#asynchronous-routing

或者这里有一个关于它的 Pluralsight 课程:https ://app.pluralsight.com/library/courses/angular-routing/table-of-contents