Skip to content

Commit

Permalink
added app bootstraps for dev and production, as well as a root compo…
Browse files Browse the repository at this point in the history
…nent snippet
  • Loading branch information
pjlamb12 committed May 5, 2016
1 parent 0153998 commit 569a659
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
15 changes: 15 additions & 0 deletions snippets/ng2-bootstrap-dev.sublime-snippet
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>
18 changes: 18 additions & 0 deletions snippets/ng2-bootstrap-prod.sublime-snippet
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>
26 changes: 26 additions & 0 deletions snippets/ng2-root-component.sublime-snippet
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>

0 comments on commit 569a659

Please sign in to comment.