File tree 2 files changed +3
-3
lines changed
addon/ng2/blueprints/ng2/files/src/app
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ import {<%= jsComponentName %>App} from '../app/<%= htmlComponentName %>';
4
4
beforeEachProviders ( ( ) => [ < %= jsComponentName % > App ] ) ;
5
5
6
6
describe ( 'App: <%= jsComponentName %>' , ( ) => {
7
- it ( 'should have the `defaultMeaning` as 42' , inject ( [ < %= jsComponentName % > App ] , ( app ) => {
7
+ it ( 'should have the `defaultMeaning` as 42' , inject ( [ < %= jsComponentName % > App ] , ( app : < %= jsComponentName % > App ) => {
8
8
expect ( app . defaultMeaning ) . toBe ( 42 ) ;
9
9
} ) ) ;
10
10
11
11
describe ( '#meaningOfLife' , ( ) => {
12
- it ( 'should get the meaning of life' , inject ( [ < %= jsComponentName % > App ] , ( app ) => {
12
+ it ( 'should get the meaning of life' , inject ( [ < %= jsComponentName % > App ] , ( app : < %= jsComponentName % > App ) => {
13
13
expect ( app . meaningOfLife ( ) ) . toBe ( 'The meaning of life is 42' ) ;
14
14
expect ( app . meaningOfLife ( 22 ) ) . toBe ( 'The meaning of life is 22' ) ;
15
15
} ) ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {Component} from 'angular2/core';
11
11
export class < %= jsComponentName % > App {
12
12
defaultMeaning : number = 42 ;
13
13
14
- meaningOfLife ( meaning ) {
14
+ meaningOfLife ( meaning ?: number ) {
15
15
return `The meaning of life is ${ meaning || this . defaultMeaning } ` ;
16
16
}
17
17
}
You can’t perform that action at this time.
0 commit comments