我感兴趣的是能够使用角度cli来引导多个应用程序.
通过angular-cli wiki,我找到了一个例子 https://github.com/angular/angular-cli/wiki/stories-multiple-apps
我也发现了 https://yakovfain.com/2017/04/06/angular-cli-multiple-apps-in-the-same-project/
我浏览了angular-cli.json文件并运行了
"apps": [
{
"name": "app1",
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
},
{
"name": "app2",
"root": "src",
"outDir": "dist2",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main2.ts",
"polyfills": "polyfills2.ts",
"test": "test2.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app2",
"styles": [
"styles.css" …Run Code Online (Sandbox Code Playgroud)