Skip to content

Commit e6ccc74

Browse files
MeAkibclydin
authored andcommitted
refactor(@schematics/angular): add trailing comma to generated services
Ensures code consistency by including trailing commas in generated service (cherry picked from commit 6dfee71)
1 parent 2c7581c commit e6ccc74

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/schematics/angular/service/files/__name@dasherize__.__type@dasherize__.ts.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from '@angular/core';
22

33
@Injectable({
4-
providedIn: 'root'
4+
providedIn: 'root',
55
})
66
export class <%= classify(name) %><%= classify(type) %> {
77

packages/schematics/angular/service/index_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('Service Schematic', () => {
5555

5656
const tree = await schematicRunner.runSchematic('service', options, appTree);
5757
const content = tree.readContent('/projects/bar/src/app/foo/foo.ts');
58-
expect(content).toMatch(/providedIn: 'root'/);
58+
expect(content).toMatch(/providedIn: 'root',/);
5959
});
6060

6161
it('should respect the skipTests flag', async () => {

0 commit comments

Comments
 (0)