This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree 6 files changed +35
-5
lines changed
6 files changed +35
-5
lines changed Original file line number Diff line number Diff line change 3
3
// Define the `phonecatApp` module
4
4
angular . module ( 'phonecatApp' , [
5
5
'ngRoute' ,
6
+ 'core' ,
6
7
'phoneDetail' ,
7
8
'phoneList'
8
9
] ) ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ angular .
4
+ module ( 'core' ) .
5
+ filter ( 'checkmark' , function ( ) {
6
+ return function ( input ) {
7
+ return input ? '\u2713' : '\u2718' ;
8
+ } ;
9
+ } ) ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ describe ( 'checkmark' , function ( ) {
4
+
5
+ beforeEach ( module ( 'core' ) ) ;
6
+
7
+ it ( 'should convert boolean values to unicode checkmark or cross' ,
8
+ inject ( function ( checkmarkFilter ) {
9
+ expect ( checkmarkFilter ( true ) ) . toBe ( '\u2713' ) ;
10
+ expect ( checkmarkFilter ( false ) ) . toBe ( '\u2718' ) ;
11
+ } )
12
+ ) ;
13
+
14
+ } ) ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ // Define the `core` module
4
+ angular . module ( 'core' , [ ] ) ;
Original file line number Diff line number Diff line change 9
9
< script src ="bower_components/angular-route/angular-route.js "> </ script >
10
10
< script src ="app.module.js "> </ script >
11
11
< script src ="app.config.js "> </ script >
12
+ < script src ="core/core.module.js "> </ script >
13
+ < script src ="core/checkmark/checkmark.filter.js "> </ script >
12
14
< script src ="phone-list/phone-list.module.js "> </ script >
13
15
< script src ="phone-list/phone-list.component.js "> </ script >
14
16
< script src ="phone-detail/phone-detail.module.js "> </ script >
Original file line number Diff line number Diff line change @@ -48,9 +48,9 @@ <h1>{{$ctrl.phone.name}}</h1>
48
48
< dt > Bluetooth</ dt >
49
49
< dd > {{$ctrl.phone.connectivity.bluetooth}}</ dd >
50
50
< dt > Infrared</ dt >
51
- < dd > {{$ctrl.phone.connectivity.infrared}}</ dd >
51
+ < dd > {{$ctrl.phone.connectivity.infrared | checkmark }}</ dd >
52
52
< dt > GPS</ dt >
53
- < dd > {{$ctrl.phone.connectivity.gps}}</ dd >
53
+ < dd > {{$ctrl.phone.connectivity.gps | checkmark }}</ dd >
54
54
</ dl >
55
55
</ li >
56
56
< li >
@@ -79,7 +79,7 @@ <h1>{{$ctrl.phone.name}}</h1>
79
79
< dt > Screen resolution</ dt >
80
80
< dd > {{$ctrl.phone.display.screenResolution}}</ dd >
81
81
< dt > Touch screen</ dt >
82
- < dd > {{$ctrl.phone.display.touchScreen}}</ dd >
82
+ < dd > {{$ctrl.phone.display.touchScreen | checkmark }}</ dd >
83
83
</ dl >
84
84
</ li >
85
85
< li >
@@ -92,9 +92,9 @@ <h1>{{$ctrl.phone.name}}</h1>
92
92
< dt > Audio / headphone jack</ dt >
93
93
< dd > {{$ctrl.phone.hardware.audioJack}}</ dd >
94
94
< dt > FM Radio</ dt >
95
- < dd > {{$ctrl.phone.hardware.fmRadio}}</ dd >
95
+ < dd > {{$ctrl.phone.hardware.fmRadio | checkmark }}</ dd >
96
96
< dt > Accelerometer</ dt >
97
- < dd > {{$ctrl.phone.hardware.accelerometer}}</ dd >
97
+ < dd > {{$ctrl.phone.hardware.accelerometer | checkmark }}</ dd >
98
98
</ dl >
99
99
</ li >
100
100
< li >
You can’t perform that action at this time.
0 commit comments