Skip to content

Commit a6385f4

Browse files
author
Gregor Woiwode
committed
Removes ng2-Component-root
1 parent 05545e5 commit a6385f4

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -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
4645
No one wants to buy a pig in a poke.
4746
The 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.

snippets/typescript.cson

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -113,27 +113,3 @@
113113
.then(success => console.log(`Bootstrap success`))
114114
.catch(error => console.log(error));$3
115115
"""
116-
'AppComponent':
117-
'prefix': 'ng2-component-root'
118-
'description': 'Angular 2 App root component snippet'
119-
'descriptionMoreURL': 'https://angular.io/docs/ts/latest/api/core/Component-decorator.html'
120-
'body': """
121-
import { Component } from '@angular/core';
122-
import { HTTP_PROVIDERS } from '@angular/http';
123-
import { Routes, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from '@angular/router';
124-
import 'rxjs/Rx'; // load the full rxjs
125-
126-
@Component({
127-
selector: '${1:selector}',
128-
templateUrl: '${2:component-name}.component.html',
129-
directives: [ROUTER_DIRECTIVES],
130-
providers: [
131-
HTTP_PROVIDERS,
132-
ROUTER_PROVIDERS
133-
]
134-
})
135-
@Routes([
136-
$3
137-
])
138-
export class AppComponent {}
139-
"""

0 commit comments

Comments
 (0)