Skip to content

Commit 97f6b75

Browse files
author
Gregor Woiwode
committed
Adds html snippets ng2-property & ng2-event
1 parent 5a450db commit 97f6b75

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 0.4.6
2+
3+
- Adds html snippet `ng2-property`
4+
```html
5+
<div [property]="value"></div>
6+
```
7+
- Adds html snippet `ng2-event`
8+
```html
9+
<div (event)="callback()"></div>
10+
```
11+
112
## 0.4.5
213

314
- Adds snippet `ng2-import`

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Type part of a snippet, press `enter`, and the snippet unfolds.
2929
|[ng2-ngFor](#ng2-ngfor) |
3030
|[ng2-ngIf](#ng2-ngif) |
3131
|[ng2-ngModel](#ng2-ngmodel) |
32+
|[ng2-property](#ng2-property) |
33+
|[ng2-event](#ng2-event) |
3234
|[ng2-routerLink](#ng2-routerlink)|
3335
|[ng2-ngStyle](#ng2-ngstyle) |
3436
|[ng2-ngSwitch](#ng2-ngswitch) |
@@ -228,6 +230,22 @@ This snippet inserts the `ngModel` directive.
228230
<div [(ngModel)]="binding"></div>
229231
```
230232

233+
### ng2-property
234+
235+
This snippet inserts the skeleton for a property binding directive.
236+
237+
```html
238+
<div [property]="value"></div>
239+
```
240+
241+
### ng2-event
242+
243+
This snippet inserts the skeleton for a event binding directive.
244+
245+
```html
246+
<div (event)="callback()"></div>
247+
```
248+
231249
### ng2-routerLink
232250

233251
This snippet inserts the `routerLink` directive.

snippets/html.cson

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@
2727
'body': """
2828
[(ngModel)]="${1:binding}"
2929
"""
30+
'ngPropertyBinding':
31+
"prefix": 'ng2-property'
32+
'description': 'Angular 2 property binding'
33+
'descriptionMoreURL': 'https://angular.io/docs/ts/latest/guide/architecture.html#!#data-binding'
34+
'body': """
35+
[${1:property}]="${2:value}"
36+
"""
37+
'ngEventBinding':
38+
"prefix": 'ng2-event'
39+
'description': 'Angular 2 event binding'
40+
'descriptionMoreURL': 'https://angular.io/docs/ts/latest/guide/architecture.html#!#data-binding'
41+
'body': """
42+
(${1:event})="${2:callback}()"
43+
"""
3044
'ngRouterLink':
3145
'prefix': 'ng2-routerLink'
3246
'description': 'Angular 2 routerLink snippet'

0 commit comments

Comments
 (0)