diff options
| author | Peter Bacon Darwin | 2014-02-12 22:47:42 +0000 |
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 19:03:41 +0000 |
| commit | a564160511bf1bbed5a4fe5d2981fae1bb664eca (patch) | |
| tree | 16fe76a5c8a4e75c50db5f15224f1b954060cd38 /docs/content/tutorial/step_11.ngdoc | |
| parent | 06f2ba899fac8ad004bf65dce39a3b05e2387c0f (diff) | |
| download | angular.js-a564160511bf1bbed5a4fe5d2981fae1bb664eca.tar.bz2 | |
docs(bike-shed-migration): fix url-based links refs to AUTO module
Diffstat (limited to 'docs/content/tutorial/step_11.ngdoc')
| -rw-r--r-- | docs/content/tutorial/step_11.ngdoc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/content/tutorial/step_11.ngdoc b/docs/content/tutorial/step_11.ngdoc index b3308cc6..3d86191b 100644 --- a/docs/content/tutorial/step_11.ngdoc +++ b/docs/content/tutorial/step_11.ngdoc @@ -53,7 +53,7 @@ of the service - 'Phone' - and the factory function. The factory function is sim controller's constructor in that both can declare dependencies via function arguments. The Phone service declared a dependency on the `$resource` service. -The {@link api/ngResource.$resource `$resource`} service makes it easy to create a +The {@link ngResource.$resource `$resource`} service makes it easy to create a [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) client with just a few lines of code. This client can then be used in our application, instead of the lower-level {@link api/ng.$http $http} service. @@ -72,8 +72,8 @@ We need to add the 'phonecatServices' module dependency to 'phonecatApp' module' ## Controller We simplified our sub-controllers (`PhoneListCtrl` and `PhoneDetailCtrl`) by factoring out the -lower-level {@link api/ng.$http $http} service, replacing it with a new service called -`Phone`. Angular's {@link api/ngResource.$resource `$resource`} service is easier to +lower-level {@link ng.$http $http} service, replacing it with a new service called +`Phone`. Angular's {@link ngResource.$resource `$resource`} service is easier to use than `$http` for interacting with data sources exposed as RESTful resources. It is also easier now to understand what the code in our controllers is doing. @@ -128,7 +128,7 @@ We have modified our unit tests to verify that our new service is issuing HTTP r processing them as expected. The tests also check that our controllers are interacting with the service correctly. -The {@link api/ngResource.$resource $resource} service augments the response object +The {@link ngResource.$resource $resource} service augments the response object with methods for updating and deleting the resource. If we were to use the standard `toEqual` matcher, our tests would fail because the test values would not match the responses exactly. To solve the problem, we use a newly-defined `toEqualData` [Jasmine matcher](https://github.com/pivotal/jasmine/wiki/Matchers). When the |
