Skip to content

Commit 618633e

Browse files
committed
refactored a-service to use providedin root
1 parent 3148e84 commit 618633e

File tree

6 files changed

+35
-30
lines changed

6 files changed

+35
-30
lines changed

.vscode/settings.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,24 @@
55
},
66
"search.exclude": {
77
"out": true
8+
},
9+
"workbench.colorCustomizations": {
10+
"activityBar.background": "#378fe7",
11+
"activityBar.activeBorder": "#ab1460",
12+
"activityBar.foreground": "#e7e7e7",
13+
"activityBar.inactiveForeground": "#e7e7e799",
14+
"activityBarBadge.background": "#ab1460",
15+
"activityBarBadge.foreground": "#e7e7e7",
16+
"titleBar.activeBackground": "#1976d2",
17+
"titleBar.inactiveBackground": "#1976d299",
18+
"titleBar.activeForeground": "#e7e7e7",
19+
"titleBar.inactiveForeground": "#e7e7e799",
20+
"statusBar.background": "#1976d2",
21+
"statusBarItem.hoverBackground": "#378fe7",
22+
"statusBar.foreground": "#e7e7e7",
23+
"panel.border": "#378fe7",
24+
"sideBar.border": "#378fe7",
25+
"editorGroup.border": "#378fe7",
26+
"tab.activeBorder": "#378fe7"
827
}
928
}

CHANGELOG.md

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

3+
<a name="8.2.0"></a>
4+
5+
# 8.2.0 (2019-11-18)
6+
7+
- Removed duplicate service snippet
8+
- Refactored `a-service` to create a service with injectable provided in root
9+
310
<a name="8.1.1"></a>
411

512
# 8.1.1 (2019-06-11)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Alternatively, press `Ctrl`+`Space` (Windows, Linux) or `Cmd`+`Space` (OSX) to a
5555
| `a-route-path-lazy` | lazy route path |
5656
| `a-router-events` | listen to one or more router events |
5757
| `a-route-params-subscribe` | subscribe to route parameters |
58-
| `a-service` | service |
58+
| `a-service` | service with injectable provided in root |
5959
| `a-service-httpclient` | service with `HttpClient` |
6060
| `a-ctor-skip-self` | angular `NgModule`'s `skipself` constructor |
6161
| `a-subscribe` | Rx Observable subscription |

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.1.1",
23+
"version": "8.2.0",
2424
"engines": {
2525
"vscode": "^1.20.0"
2626
},

snippets/typescript.json

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,6 @@
3535
"}"
3636
]
3737
},
38-
"Angular Service": {
39-
"prefix": "a-service",
40-
"description": "Angular service",
41-
"body": [
42-
"import { Injectable } from '@angular/core';",
43-
"",
44-
"@Injectable()",
45-
"export class ${1:Name}Service {",
46-
"$0",
47-
"\tconstructor() { }",
48-
"}"
49-
]
50-
},
5138
"Angular Pipe": {
5239
"prefix": "a-pipe",
5340
"description": "Angular pipe",
@@ -65,9 +52,9 @@
6552
"}"
6653
]
6754
},
68-
"Angular ProvidedIn Root": {
69-
"prefix": "a-injectable-providedin",
70-
"description": "Angular Injectable ProvidedIn",
55+
"Angular Service": {
56+
"prefix": "a-service",
57+
"description": "Angular Service with Injectable ProvidedIn Root",
7158
"body": ["@Injectable({providedIn: ${1:'root'}})$0"]
7259
},
7360
"Angular Default Route Path": {
@@ -207,11 +194,7 @@
207194
"Subscribe": {
208195
"prefix": "a-subscribe",
209196
"description": "Angular observable subscribe",
210-
"body": [
211-
"this.${1:service}.${2:function}",
212-
"\t.subscribe(${3:arg} => this.${4:property} = ${3:arg});",
213-
"$0"
214-
]
197+
"body": ["this.${1:service}.${2:function}", "\t.subscribe(${3:arg} => this.${4:property} = ${3:arg});", "$0"]
215198
},
216199
"Angular Root Component": {
217200
"prefix": "a-component-root",
@@ -475,16 +458,12 @@
475458
"NgRx Create Action": {
476459
"prefix": "a-ngrx-create-action",
477460
"description": "Creates an NgRx Action",
478-
"body": [
479-
"export const ${1:action} = createAction('[${2:Source}] ${3:Event}');"
480-
]
461+
"body": ["export const ${1:action} = createAction('[${2:Source}] ${3:Event}');"]
481462
},
482463
"NgRx Create Action w/ Props": {
483464
"prefix": "a-ngrx-create-action-props",
484465
"description": "Creates an NgRx Action with Props",
485-
"body": [
486-
"export const ${1:action} = createAction('[${2:Source}] ${3:Event}', props<{${4:key}: ${5:type}}>());"
487-
]
466+
"body": ["export const ${1:action} = createAction('[${2:Source}] ${3:Event}', props<{${4:key}: ${5:type}}>());"]
488467
},
489468
"NgRx Create Reducer": {
490469
"prefix": "a-ngrx-create-reducer",

0 commit comments

Comments
 (0)