Angular 6 中单个项目下的多个应用程序 [英] Multiple application under single project in Angular 6
问题描述
如何在 Angular 6 中的单个项目下创建多个应用程序?在新的 angular.json 文件中,没有 "app":[]
数组,之前我们手动创建/添加多个应用程序.我在这个阶段也没有找到合适的文档,其中详细说明了如何在单个项目中创建多个应用程序.任何帮助,将不胜感激.谢谢.
How to create multiple application under single project in Angular 6? In new angular.json file, there is no "app":[]
array, where before we used to create/add multiple applications manually. Also there is no proper documentation I found at this stage, which elaborate how to create multiple application in single project. Any help would be appreciated. Thank you.
推荐答案
就像@JB Nizet 说的...你可以使用 generate application
(https://github.com/angular/angular-cli/wiki/generate-application)
Like @JB Nizet said... you can use generate application
(https://github.com/angular/angular-cli/wiki/generate-application)
ng generate application <application-name>
在项目文件夹中生成一个应用程序,然后使用
to generate an application in the projects folder, and then serve it using
ng serve --project <application-name>
同样,您可以使用 ng generate library
(https://github.com/angular/angular-cli/wiki/generate-library)
Similarly, you can create component libraries using ng generate library
(https://github.com/angular/angular-cli/wiki/generate-library)
ng generate library <library-name>
用于项目之间使用的通用组件.除非您在执行 ng new
时更改了项目根目录,否则两者都会安装到 /projects
文件夹中.
For common components used between projects. Both of which get installed into the /projects
folder unless you changed the projects root when doing ng new
.
这篇关于Angular 6 中单个项目下的多个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!