@@ -39,12 +39,14 @@ __`app/index.html`.__
39
39
40
40
__`app/js/services.js`.__
41
41
<pre>
42
- var phonecatApp = angular.module('phonecatServices', ['ngResource']).
43
- factory('Phone', function($resource){
44
- return $resource('phones/:phoneId.json', {}, {
45
- query: {method:'GET', params:{phoneId:'phones'}, isArray:true}
46
- });
47
- });
42
+ var phonecatServices = angular.module('phonecatServices', ['ngResource']);
43
+
44
+ phonecatServices.factory('Phone', ['$resource',
45
+ function($resource){
46
+ return $resource('phones/:phoneId.json', {}, {
47
+ query: {method:'GET', params:{phoneId:'phones'}, isArray:true}
48
+ });
49
+ }]);
48
50
</pre>
49
51
50
52
We used the module API to register a custom service using a factory function. We passed in the name
@@ -215,8 +217,8 @@ You should now see the following output in the Karma tab:
215
217
216
218
# Summary
217
219
218
- There you have it! We have created a web app in a relatively short amount of time. In the {@link
219
- the_end closing notes} we'll cover where to go from here .
220
+ With the phone image swapper in place, we're ready for {@link step_12 step 12} (the last step!) to
221
+ learn how to improve this application with animations .
220
222
221
223
222
224
<ul doc-tutorial-nav="11"></ul>
0 commit comments