Skip to content

Commit 70e67fe

Browse files
pawelfrasdgp1130
authored andcommitted
fix(@schematics/angular): add missing typeSeparator to main.ts.template file
1 parent 69824ae commit 70e67fe

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/schematics/angular/application/files/module-files/src/main.ts.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<% if(!!viewEncapsulation) { %>import { ViewEncapsulation } from '@angular/core';
22
<% }%>import { platformBrowser } from '@angular/platform-browser';
3-
import { AppModule } from './app/app-module';
3+
import { AppModule } from './app/app<%= typeSeparator %>module';
44

55
platformBrowser().bootstrapModule(AppModule, {
66
<% if(!zoneless) { %>ngZoneEventCoalescing: true,<% } %><% if(!!viewEncapsulation) { %>

packages/schematics/angular/application/index_spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,9 @@ describe('Application Schematic', () => {
919919
};
920920
const tree = await schematicRunner.runSchematic('application', options, workspaceTree);
921921
const module = tree.readContent('/projects/foo/src/app/app.module.ts');
922+
const main = tree.readContent('/projects/foo/src/main.ts');
922923
expect(module).toContain(`import { App } from './app.component'`);
924+
expect(main).toContain(`import { AppModule } from './app/app.module'`);
923925
});
924926

925927
it('should create a routing module with the correct suffix', async () => {

0 commit comments

Comments
 (0)