diff --git a/e2e/schematics/application.test.ts b/e2e/schematics/application.test.ts
index 4d331bd8f2..3929c40caa 100644
--- a/e2e/schematics/application.test.ts
+++ b/e2e/schematics/application.test.ts
@@ -25,7 +25,7 @@ describe('Nrwl Workspace', () => {
`
);
- runCLI('build --aot');
+ runCLI('build --aot -a=my-dir/my-app');
expect(runCLI('test --single-run')).toContain('Executed 2 of 2 SUCCESS');
},
1000000
@@ -38,7 +38,7 @@ describe('Nrwl Workspace', () => {
newApp('myApp --directory=myDir --routing');
newLib('myLib --directory=myDir --routing --lazy --parentModule=apps/my-dir/my-app/src/app/app.module.ts');
- runCLI('build --aot');
+ runCLI('build --aot -a=my-dir/my-app');
expect(runCLI('test --single-run')).toContain('Executed 2 of 2 SUCCESS');
},
1000000
@@ -51,7 +51,7 @@ describe('Nrwl Workspace', () => {
newApp('myApp --directory=myDir --routing');
newLib('myLib --directory=myDir --routing --parentModule=apps/my-dir/my-app/src/app/app.module.ts');
- runCLI('build --aot');
+ runCLI('build --aot -a=my-dir/my-app');
expect(runCLI('test --single-run')).toContain('Executed 2 of 2 SUCCESS');
},
1000000
diff --git a/packages/schematics/src/collection/app/component-files/app.component.html__tmpl__ b/packages/schematics/src/collection/app/component-files/app.component.html__tmpl__
deleted file mode 100644
index a828010fd6..0000000000
--- a/packages/schematics/src/collection/app/component-files/app.component.html__tmpl__
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- Welcome to an Angular CLI app built with Nrwl Nx!
-
-

-
-
-Nx
-
-An open source toolkit for enterprise Angular applications.
-
-Nx is designed to help you create and build enterprise grade Angular applications. It provides an opinionated approach to application project structure and patterns.
-
-Quick Start & Documentation
-
-Watch a 5-minute video on how to get started with Nx.<% if (routing) { %>
-
-<% } %>
diff --git a/packages/schematics/src/collection/app/index.ts b/packages/schematics/src/collection/app/index.ts
index d4b382a908..f7bbfa047f 100644
--- a/packages/schematics/src/collection/app/index.ts
+++ b/packages/schematics/src/collection/app/index.ts
@@ -114,6 +114,33 @@ function addRouterRootConfiguration(path: string): Rule {
};
}
+const staticComponentContent = `
+
+
+ Welcome to an Angular CLI app built with Nrwl Nx!
+
+

+
+
+Nx
+
+An open source toolkit for enterprise Angular applications.
+
+Nx is designed to help you create and build enterprise grade Angular applications. It provides an opinionated approach to application project structure and patterns.
+
+Quick Start & Documentation
+
+Watch a 5-minute video on how to get started with Nx.`;
+
+function updateComponentTemplate(options: NormalizedSchema): Rule {
+ return (host: Tree) => {
+ const content = options.routing
+ ? `${staticComponentContent}\n`
+ : staticComponentContent;
+ host.overwrite(`${options.fullPath}/app/app.component.html`, content);
+ };
+}
+
export default function(schema: Schema): Rule {
const options = normalizeOptions(schema);
@@ -144,15 +171,7 @@ export default function(schema: Schema): Rule {
viewEncapsulation: options.viewEncapsulation,
changeDetection: options.changeDetection
}),
-
- mergeWith(
- apply(url('./component-files'), [
- options.inlineTemplate ? filter(path => !path.endsWith('.html')) : noop(),
- template({ ...options, tmpl: '' }),
- move(`${options.fullPath}/app`)
- ]),
- MergeStrategy.Overwrite
- ),
+ updateComponentTemplate(options),
addBootstrap(options.fullPath),
addNxModule(options.fullPath),
addAppToAngularCliJson(options),