-
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 app bootstraps for dev and production, as well as a root compo…
…nent snippet
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
import { bootstrap } from '@angular/platform-browser-dynamic'; | ||
import { ${1:AppComponent} } from './${2:name}.component'; | ||
bootstrap(${AppComponent}) | ||
.then(success => console.log(`Bootstrap success`)) | ||
.catch(error => console.log(error)); | ||
$0 | ||
]]></content> | ||
<tabTrigger>ng2-bootstrap-dev</tabTrigger> | ||
<scope>source.ts,source.tsx</scope> | ||
<description>Angular 2 Development Bootstrap 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,18 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
import { enableProdMode } from '@angular/core'; | ||
import { bootstrap } from '@angular/platform-browser-dynamic'; | ||
import { ${1:AppComponent} } from './${2:name}.component'; | ||
enableProdMode(); | ||
bootstrap(${AppComponent}) | ||
.then(success => console.log(`Bootstrap success`)) | ||
.catch(error => console.log(error)); | ||
$0 | ||
]]></content> | ||
<tabTrigger>ng2-bootstrap-prod</tabTrigger> | ||
<scope>source.ts,source.tsx</scope> | ||
<description>Angular 2 Production Bootstrap 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,26 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
import { Component } from '@angular/core'; | ||
import { HTTP_PROVIDERS } from '@angular/http'; | ||
import { Routes, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router'; | ||
import 'rxjs/Rx'; | ||
@Component({ | ||
//moduleId: module.id, | ||
selector: '${1:selector}', | ||
templateUrl: '${2:name}.component.html', | ||
directives: [ROUTER_DIRECTIVES], | ||
providers: [ | ||
HTTP_PROVIDERS, | ||
ROUTER_PROVIDERS | ||
] | ||
}) | ||
export class AppComponent { | ||
constructor() {} | ||
$0 | ||
} | ||
]]></content> | ||
<tabTrigger>ng2-root-component</tabTrigger> | ||
<scope>source.ts,source.tsx</scope> | ||
<description>Angular 2 Root Component Snippet</description> | ||
</snippet> |