File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
addon/ng2/blueprints/ng2/files/src Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { bootstrap } from 'angular2/platform/browser' ;
2
2
import { < %= jsComponentName % > App } from './app/<%= htmlComponentName %>' ;
3
- import { ROUTER_PROVIDERS } from 'angular2/router' ;
4
3
5
- bootstrap ( < %= jsComponentName % > App , [
6
- ROUTER_PROVIDERS
7
- ] ) ;
4
+ bootstrap ( < %= jsComponentName % > App , [ ] ) ;
Original file line number Diff line number Diff line change 1
1
import { Component } from 'angular2/core' ;
2
- import { RouteConfig , ROUTER_DIRECTIVES } from 'angular2/router' ;
2
+ import { RouteConfig , ROUTER_DIRECTIVES , ROUTER_PROVIDERS } from 'angular2/router' ;
3
3
4
4
5
5
@Component ( {
6
6
selector : '<%= htmlComponentName %>-app' ,
7
- providers : [ ] ,
7
+ providers : [ ROUTER_PROVIDERS ] ,
8
8
templateUrl : 'app/<%= htmlComponentName %>.html' ,
9
9
directives : [ ROUTER_DIRECTIVES ] ,
10
10
pipes : [ ]
@@ -14,7 +14,7 @@ import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
14
14
] )
15
15
export class < %= jsComponentName % > App {
16
16
defaultMeaning : number = 42 ;
17
-
17
+
18
18
meaningOfLife ( meaning ?: number ) {
19
19
return `The meaning of life is ${ meaning || this . defaultMeaning } ` ;
20
20
}
You can’t perform that action at this time.
0 commit comments