@@ -10,7 +10,6 @@ Type part of a snippet, press `enter`, and the snippet unfolds.
1010
1111| snippet| explanation|
1212| -------| -----------|
13- | [ ng2-component-root] ( #ng2-component-root ) | Angular 2 root App component|
1413| [ ng2-bootstrap] ( #ng2-bootstrap ) | Angular 2 bootstraping, for main.ts|
1514| [ ng2-component] ( #ng2-component ) | Angular 2 component|
1615| [ ng2-directive] ( #ng2-directive ) | Angular 2 directive|
@@ -46,34 +45,6 @@ It seems that you need to have a `tsconfig.json` to get the TypeScript snippets
4645No one wants to buy a pig in a poke.
4746The following section will show you what the provided snippets actually do for you.
4847
49- ### ng2-component-root
50-
51- ` ng2-component-root ` gives you a component that you want as entry point for your application.
52- It also sets up Routing, the HTTP client and RxJS.
53- Per default the RxJs library is referenced.
54-
55- ``` ts
56- import { Component } from ' @angular/core' ;
57- import { HTTP_PROVIDERS } from ' @angular/http' ;
58- import { Routes , ROUTER_DIRECTIVES , ROUTER_PROVIDERS } from ' @angular/router' ;
59- import ' rxjs/Rx' ; // load the full rxjs
60-
61- @Component ({
62- moduleId: module .id ,
63- selector: ' <selector>' ,
64- templateUrl: ' <template-name>.component.html' ,
65- directives: [ROUTER_DIRECTIVES ],
66- providers: [
67- HTTP_PROVIDERS ,
68- ROUTER_PROVIDERS
69- ]
70- })
71- @Routes ([
72-
73- ])
74- export class AppComponent {}
75- ```
76-
7748### ng2-bootstrap
7849
7950` ng2-bootstrap ` allows you to start your root component to get your app up and running.
0 commit comments