Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/documentation/generate/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,12 @@ Create an Angular application.
Do not add dependencies to package.json.
</p>
</details>
<details>
<summary>project-root</summary>
<p>
<code>--project-root</code>
</p>
<p>
Specify root folder for new application and e2e tests
</p>
</details>
2 changes: 1 addition & 1 deletion docs/documentation/stories/multiple-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ To create another app you can use the following command:
ng generate application my-other-app
```

The new application will be generated inside `projects/my-other-app`.
The new application will be generated inside `projects/my-other-app`. If you wish to override root folder specify `--project-root applicationPath`

Now we can `serve`, `build` etc. both the apps by passing the project name with the commands:

Expand Down
4 changes: 1 addition & 3 deletions packages/schematics/angular/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,8 @@ export default function (options: ApplicationOptions): Rule {
name: `${options.name}-e2e`,
relatedAppName: options.name,
rootSelector: appRootSelector,
projectRoot: newProjectRoot ? `${newProjectRoot}/e2e` : 'e2e',
};
if (options.projectRoot !== undefined) {
e2eOptions.projectRoot = 'e2e';
}

return chain([
addAppToWorkspaceFile(options, workspace),
Expand Down