-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added http-get, pipe, route-definition, routes, and subscribe
- Loading branch information
Showing
7 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
return this.${1:http}.get('${2:url}') | ||
.map((res: Response) => res.json());$0 | ||
]]></content> | ||
<tabTrigger>ng2-http-get</tabTrigger> | ||
<scope>source.ts,source.tsx</scope> | ||
<description>Angular 2 HTTP Get Snippet</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
@Pipe({ | ||
name: '${1:pipeName}' | ||
}) | ||
export class ${2:PipeName}Pipe implements PipeTransform { | ||
transform(value: any, args: any[]): any { | ||
if(value) { | ||
$0 | ||
} else { | ||
return ''; | ||
} | ||
} | ||
} | ||
]]></content> | ||
<tabTrigger>ng2-pipe</tabTrigger> | ||
<scope>source.ts,source.tsx</scope> | ||
<description>Angular 2 Pipe Snippet</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
{ path: '/${1:path}', component: ${2:Component}, name: '${2:Component}' } | ||
]]></content> | ||
<tabTrigger>ng2-route-definition</tabTrigger> | ||
<scope>source.ts,source.tsx</scope> | ||
<description>Angular 2 Route Definition Snippet</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
@Routes([ | ||
{ path: '/${1:path}', component: ${2:Component}, name: '${2:Component}' } | ||
]) | ||
]]></content> | ||
<tabTrigger>ng2-routes</tabTrigger> | ||
<scope>source.ts,source.tsx</scope> | ||
<description>Angular 2 Routes Snippet</description> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
this.${1:service}.${2:function}() | ||
.subscribe(${3:arg} => this.${4:property} = ${3:arg});$0 | ||
]]></content> | ||
<tabTrigger>ng2-subscribe</tabTrigger> | ||
<scope>source.ts,source.tsx</scope> | ||
<description>Angular 2 Subscribe Snippet</description> | ||
</snippet> |