在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
(
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屋!