Skip to content

Commit e33e77d

Browse files
pawelfrasdgp1130
authored andcommitted
fix(@schematics/angular): flag '--file-name-style-guide=2016' - wrong import in main.ts
(cherry picked from commit a8bd8f7)
1 parent 907c899 commit e33e77d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { bootstrapApplication } from '@angular/platform-browser';
22
import { appConfig } from './app/app.config';
3-
import { App } from './app/app';
3+
import { App } from './app/app<%= suffix %>';
44

55
bootstrapApplication(App, appConfig)
66
.catch((err) => console.error(err));

packages/schematics/angular/application/index_spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,10 @@ describe('Application Schematic', () => {
876876
const options = { ...defaultOptions, fileNameStyleGuide: '2016' as const };
877877
const tree = await schematicRunner.runSchematic('application', options, workspaceTree);
878878
const component = tree.readContent('/projects/foo/src/app/app.component.ts');
879+
const main = tree.readContent('/projects/foo/src/main.ts');
879880
expect(component).toContain(`templateUrl: './app.component.html'`);
880881
expect(component).toContain(`styleUrl: './app.component.css'`);
882+
expect(main).toContain(`import { App } from './app/app.component'`);
881883
});
882884

883885
it('should create a test file with import from the path without suffix', async () => {

0 commit comments

Comments
 (0)