Multiple app defintions in the angular-cli.json "apps" : [ ] property
See original GitHub issueMultiple app definitions
I noticed that inside the angular-cli.json
file, the "apps":
property is defined as an array. Is the following a valid example of the intended use for this property?
angular-cli.json :
{
"project": {
"version": "1.0.0-beta.26",
"name": "example1"
},
"apps": [
{
"root": "src",
"outDir": "dist",
...
},
{
"root": "src2",
"outDir": "dist2",
...
}
],
...
}
I’ve tested with multiple definitions in the “apps”: property. And ng build
always builds the first app defintiion.
If all these assumptions are correct, How do you use ng build
to compile the second app definition?
Current Config.
angular-cli: 1.0.0-beta.26 node: 6.5.0 os: win32 x64 @angular/common: 2.4.4 @angular/compiler: 2.4.4 @angular/core: 2.4.4 @angular/forms: 2.4.4 @angular/http: 2.4.4 @angular/platform-browser: 2.4.4 @angular/platform-browser-dynamic: 2.4.4 @angular/router: 3.4.4 @angular/compiler-cli: 2.4.4
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Angular CLI: multiple apps in the same project - Yakov Fain
Say you have 2 apps: app1 and app2 configured in your .angular-cli.json. You can run builds separately: ng build --app app1 , and...
Read more >Angular workspace configuration
The angular.json file at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults.
Read more >How to build multiple applications with angular-cli?
The JSON schema for the apps element describes it this way: Properties of the different applications in this project.
Read more >Understanding the Angular CLI Workspace File
An Angular Workspace is a project which is produced by the ng new command. An Angular Workspace able to consist the sources of...
Read more >How to manage different environments with Angular CLI ...
Then when you run a build for QA, Angular CLI is going to use environment.qa.ts to read the environment.serverUrl property value and you're...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is there a timeline for this? Could you suggest a workaround until then?
That is the intended future use. However, only one app is currently supported.