Skip to content

Commit 1627db0

Browse files
paulheisingjohnpapa
authored andcommitted
Fix a service
1 parent 6adf568 commit 1627db0

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## Angular Snippets Changelog
22

3+
<a name="8.3.0"></a>
4+
5+
# 8.3.0 (2019-12-18)
6+
7+
- Fixed `a-service` to create a service with injectable provided in root
8+
39
<a name="8.2.0"></a>
410

511
# 8.2.0 (2019-11-18)

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"TypeScript",
2121
"HTML"
2222
],
23-
"version": "8.2.0",
23+
"version": "8.3.0",
2424
"engines": {
2525
"vscode": "^1.20.0"
2626
},

snippets/typescript.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,15 @@
5555
"Angular Service": {
5656
"prefix": "a-service",
5757
"description": "Angular Service with Injectable ProvidedIn Root",
58-
"body": ["@Injectable({providedIn: ${1:'root'}})$0"]
58+
"body": [
59+
"import { Injectable } from '@angular/core';",
60+
"",
61+
"@Injectable({providedIn: ${2:'root'}})",
62+
"export class ${1:ServiceName}Service {",
63+
"\tconstructor() { }",
64+
"\t$0",
65+
"}"
66+
]
5967
},
6068
"Angular Default Route Path": {
6169
"prefix": "a-route-path-default",

0 commit comments

Comments
 (0)