@@ -67,17 +67,17 @@ __`app/js/controllers.js`.__
67
67
<pre>
68
68
...
69
69
70
- function PhoneListCtrl(Phone_ ) {
70
+ function PhoneListCtrl(Phone ) {
71
71
this.orderProp = 'age';
72
- this.phones = Phone_ .query();
72
+ this.phones = Phone .query();
73
73
}
74
74
//PhoneListCtrl.$inject = ['Phone'];
75
75
76
76
77
- function PhoneDetailCtrl(Phone_ ) {
77
+ function PhoneDetailCtrl(Phone ) {
78
78
var self = this;
79
79
80
- self.phone = Phone_ .get({phoneId: self.params.phoneId}, function(phone) {
80
+ self.phone = Phone .get({phoneId: self.params.phoneId}, function(phone) {
81
81
self.mainImageUrl = phone.images[0];
82
82
});
83
83
@@ -94,7 +94,7 @@ Notice how in `PhoneListCtrl` we replaced:
94
94
95
95
with:
96
96
97
- this.phones = Phone_ .query();
97
+ this.phones = Phone .query();
98
98
99
99
This is a simple statement that we want to query for all phones.
100
100
@@ -116,7 +116,7 @@ We have modified our unit tests to verify that our new service is issuing HTTP r
116
116
processing them as expected. The tests also check that our controllers are interacting with the
117
117
service correctly.
118
118
119
- The {@link api/angular.service.$resource $resource} client augments the response object with
119
+ The {@link api/angular.service.$resource $resource} service augments the response object with
120
120
methods for updating and deleting the resource. If we were to use the standard `toEqual` matcher,
121
121
our tests would fail because the test values would not match the responses exactly. To solve the
122
122
problem, we use a newly-defined `toEqualData` {@link
0 commit comments