Skip to content

Commit 0989957

Browse files
committed
Merge branch 'master' of github.com:johnpapa/vscode-angular-snippets
2 parents 9b8125e + 4217401 commit 0989957

File tree

6 files changed

+33
-20
lines changed

6 files changed

+33
-20
lines changed

CHANGELOG.md

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

3+
<a name="9.1.2"></a>
4+
5+
# 9.1.2 (2020-03-07)
6+
7+
- Added a prompt for the debugging task for VS Code
8+
- Added extensionKind workspace, to fix [The extension cannot be installed into VSO](https://github.com/johnpapa/vscode-angular-snippets/issues/109)
9+
10+
<a name="9.1.1"></a>
11+
12+
# 9.1.1 (2020-02-22)
13+
14+
- Added `a-trackby` to create a trackby function in TypeScript for the `ngFor`
15+
- Removed `a-module-routing` and replaced with `a-routes`. Routes will be defined in a `router.ts` file and no more Routing Module.
16+
317
<a name="9.0.1"></a>
418

519
# 9.0.1 (2020-02-10)

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Angular TypeScript Snippets for VS Code
22

3-
**Now Updated for Angular 8.0.0 release**
3+
**Now Updated for Angular 9.0.0 release**
44

55
This extension for Visual Studio Code adds snippets for Angular for TypeScript and HTML.
66

@@ -31,6 +31,7 @@ Alternatively, press `Ctrl`+`Space` (Windows, Linux) or `Cmd`+`Space` (macOS) to
3131
| `a-component` | component |
3232
| `a-component-inline` | component with inline template |
3333
| `a-component-root` | root app component |
34+
| `a-ctor-skip-self` | angular `NgModule`'s `skipself` constructor |
3435
| `a-directive` | directive |
3536
| `a-guard-can-activate` | `CanActivate` guard |
3637
| `a-guard-can-activate-child` | `CanActivateChild` guard |
@@ -42,12 +43,12 @@ Alternatively, press `Ctrl`+`Space` (Windows, Linux) or `Cmd`+`Space` (macOS) to
4243
| `a-http-interceptor-logging` | Angular `HttpInterceptor` that logs traffic for `HttpClient` |
4344
| `a-module` | module |
4445
| `a-module-root` | root app module |
45-
| `a-module-routing` | routing module file (forChild) |
4646
| `a-output-event` | `@Output` event and emitter |
4747
| `a-pipe` | pipe |
4848
| `a-preload-opt-in-strategy` | custom preload strategy that allows choosing which routes to preload |
4949
| `a-preload-network-strategy` | custom preload strategy that preloads based on network connectivity |
5050
| `a-resolver` | resolver |
51+
| `a-routes` | Route definition file |
5152
| `a-rxjs-import` | import RxJs features |
5253
| `a-rxjs-operators` | import RxJs operators |
5354
| `a-route-path-404` | 404 route path |
@@ -59,8 +60,8 @@ Alternatively, press `Ctrl`+`Space` (Windows, Linux) or `Cmd`+`Space` (macOS) to
5960
| `a-route-params-subscribe` | subscribe to route parameters |
6061
| `a-service` | service with injectable provided in root |
6162
| `a-service-httpclient` | service with `HttpClient` |
62-
| `a-ctor-skip-self` | angular `NgModule`'s `skipself` constructor |
6363
| `a-subscribe` | Rx Observable subscription |
64+
| `a-trackby` | to create a trackby function in TypeScript for the `ngFor` |
6465

6566
### NgRx Snippets
6667

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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"publisher": "johnpapa",
44
"displayName": "Angular Snippets (Version 9)",
55
"description": "Angular version 9 snippets by John Papa",
6+
"version": "9.1.2",
67
"icon": "images/angular-shield.png",
78
"galleryBanner": {
89
"color": "#0273D4",
@@ -20,7 +21,6 @@
2021
"TypeScript",
2122
"HTML"
2223
],
23-
"version": "9.0.1",
2424
"engines": {
2525
"vscode": "^1.40.0"
2626
},
@@ -32,7 +32,8 @@
3232
"postinstall": "node ./node_modules/vscode/bin/install"
3333
},
3434
"extensionKind": [
35-
"ui"
35+
"ui",
36+
"workspace"
3637
],
3738
"main": "./out/src/extension",
3839
"categories": [

snippets/jsonc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"body": [
3232
"{",
3333
"\t\"type\": \"npm\",",
34-
"\t\"script\": \"start\",",
34+
"\t\"script\": \"${1:start}\",",
3535
"\t\"isBackground\": true,",
3636
"\t\"presentation\": {",
3737
"\t\t\"focus\": true,",

snippets/typescript.json

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -243,21 +243,13 @@
243243
"$0"
244244
]
245245
},
246-
"Angular Module with Routing": {
247-
"prefix": "a-module-with-routing",
248-
"description": "Angular module with routing combined into one file",
246+
"Route definitions": {
247+
"prefix": "a-routes",
248+
"description": "Route definitions",
249249
"body": [
250-
"import { NgModule } from '@angular/core';",
251-
"import { Routes, RouterModule } from '@angular/router';",
252-
"",
253-
"const routes: Routes = [${0}]",
250+
"import { Routes } from '@angular/router';",
254251
"",
255-
"@NgModule({",
256-
"\timports: [RouterModule.${2:forChild}(routes)],",
257-
"\texports: [],",
258-
"\tdeclarations: [],",
259-
"})",
260-
"export class ${1:Name}Module { }"
252+
"export const routes: Routes = [${0}]"
261253
]
262254
},
263255
"Angular Module": {
@@ -608,5 +600,10 @@
608600
" }",
609601
"}"
610602
]
603+
},
604+
"TrackBy Function": {
605+
"prefix": "a-trackby",
606+
"description": "TrackBy Function",
607+
"body": ["${1:trackBy}(index: number, ${2:name}: ${3:model}): ${4:number} {", " return ${2:name}${5:.id};$0", "}"]
611608
}
612609
}

0 commit comments

Comments
 (0)