Skip to content

Commit 1573293

Browse files
cexbrayatalan-agius4
authored andcommittedMar 30, 2024·
fix(@schematics/angular): add spaces around eventCoalescing option
The usual coding style in the generated application is to have spaces in objects (see `server.ts.template` for example).
1 parent 508d97d commit 1573293

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎packages/schematics/angular/application/files/standalone-files/src/app/app.config.ts.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import { provideRouter } from '@angular/router';
44
import { routes } from './app.routes';<% } %>
55

66
export const appConfig: ApplicationConfig = {
7-
providers: [provideZoneChangeDetection({eventCoalescing: true})<% if (routing) { %>, provideRouter(routes)<% } %>]
7+
providers: [provideZoneChangeDetection({ eventCoalescing: true })<% if (routing) { %>, provideRouter(routes)<% } %>]
88
};

‎packages/schematics/angular/application/index_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ describe('Application Schematic', () => {
545545

546546
const tree = await schematicRunner.runSchematic('application', options, workspaceTree);
547547
const appConfig = tree.readContent('/projects/foo/src/app/app.config.ts');
548-
expect(appConfig).toContain('provideZoneChangeDetection({eventCoalescing: true})');
548+
expect(appConfig).toContain('provideZoneChangeDetection({ eventCoalescing: true })');
549549
});
550550

551551
it('should create a standalone component', async () => {

‎packages/schematics/angular/utility/standalone/rules_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ describe('standalone utilities', () => {
442442
assertContains(content, `import { provideModule } from '@my/module';`);
443443
assertContains(
444444
content,
445-
`providers: [provideZoneChangeDetection({eventCoalescing:true}),provideModule([])]`,
445+
`providers: [provideZoneChangeDetection({ eventCoalescing:true }),provideModule([])]`,
446446
);
447447
});
448448

0 commit comments

Comments
 (0)
Please sign in to comment.