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 11import { bootstrap } from 'angular2/platform/browser' ;
22import { < %= jsComponentName % > App } from './app/<%= htmlComponentName %>' ;
3- import { ROUTER_PROVIDERS } from 'angular2/router' ;
43
5- bootstrap ( < %= jsComponentName % > App , [
6- ROUTER_PROVIDERS
7- ] ) ;
4+ bootstrap ( < %= jsComponentName % > App , [ ] ) ;
Original file line number Diff line number Diff line change 11import { Component } from 'angular2/core' ;
2- import { RouteConfig , ROUTER_DIRECTIVES } from 'angular2/router' ;
2+ import { RouteConfig , ROUTER_DIRECTIVES , ROUTER_PROVIDERS } from 'angular2/router' ;
33
44
55@Component ( {
66 selector : '<%= htmlComponentName %>-app' ,
7- providers : [ ] ,
7+ providers : [ ROUTER_PROVIDERS ] ,
88 templateUrl : 'app/<%= htmlComponentName %>.html' ,
99 directives : [ ROUTER_DIRECTIVES ] ,
1010 pipes : [ ]
@@ -14,7 +14,7 @@ import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
1414] )
1515export class < %= jsComponentName % > App {
1616 defaultMeaning : number = 42 ;
17-
17+
1818 meaningOfLife ( meaning ?: number ) {
1919 return `The meaning of life is ${ meaning || this . defaultMeaning } ` ;
2020 }
You can’t perform that action at this time.
0 commit comments