diff --git a/docs/documentation/generate/application.md b/docs/documentation/generate/application.md
index 439d24693cf2..c103c3496042 100644
--- a/docs/documentation/generate/application.md
+++ b/docs/documentation/generate/application.md
@@ -96,3 +96,12 @@ Create an Angular application.
Do not add dependencies to package.json.
+
+ project-root
+
+ --project-root
+
+
+ Specify root folder for new application and e2e tests
+
+
\ No newline at end of file
diff --git a/docs/documentation/stories/multiple-projects.md b/docs/documentation/stories/multiple-projects.md
index d1a49bce61e4..43b03277a7a1 100644
--- a/docs/documentation/stories/multiple-projects.md
+++ b/docs/documentation/stories/multiple-projects.md
@@ -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:
diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts
index 269e30d2f44d..ab02f6d25905 100644
--- a/packages/schematics/angular/application/index.ts
+++ b/packages/schematics/angular/application/index.ts
@@ -270,10 +270,8 @@ export default function (options: ApplicationOptions): Rule {
name: `${options.name}-e2e`,
relatedAppName: options.name,
rootSelector: appRootSelector,
+ projectRoot: `${newProjectRoot}/e2e`,
};
- if (options.projectRoot !== undefined) {
- e2eOptions.projectRoot = 'e2e';
- }
return chain([
addAppToWorkspaceFile(options, workspace),