From f16150d5f1b20b3d633b4402095ea89baa4be042 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 11 Jun 2012 23:49:24 -0700 Subject: docs(*): simplify doc urls we now have two types of namespaces: - true namespace: angular.* - used for all global apis - virtual namespace: ng.*, ngMock.*, ... - used for all DI modules the virual namespaces have services under the second namespace level (e.g. ng.) and filters and directives prefixed with filter: and directive: respectively (e.g. ng.filter:orderBy, ng.directive:ngRepeat) this simplifies urls and makes them a lot shorter while still avoiding name collisions --- docs/content/tutorial/step_11.ngdoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/content/tutorial/step_11.ngdoc') diff --git a/docs/content/tutorial/step_11.ngdoc b/docs/content/tutorial/step_11.ngdoc index 0efc5bfb..b5bd2fbe 100644 --- a/docs/content/tutorial/step_11.ngdoc +++ b/docs/content/tutorial/step_11.ngdoc @@ -14,7 +14,7 @@ In this step, you will improve the way our app fetches data. The last improvement we will make to our app is to define a custom service that represents a {@link http://en.wikipedia.org/wiki/Representational_State_Transfer RESTful} client. Using this client we can make xhr requests for data in an easier way, without having to deal with the lower-level {@link -api/angular.module.ng.$http $http} API, HTTP methods and URLs. +api/ng.$http $http} API, HTTP methods and URLs. The most important changes are listed below. You can see the full diff on {@link https://github.com/angular/angular-phonecat/compare/step-10...step-11 @@ -52,17 +52,17 @@ 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/angular.module.ngResource.$resource `$resource`} service makes it easy to create a +The {@link api/ngResource.$resource `$resource`} service makes it easy to create a {@link http://en.wikipedia.org/wiki/Representational_State_Transfer RESTful} client with just a few lines of code. This client can then be used in our application, instead of the lower-level {@link -api/angular.module.ng.$http $http} service. +api/ng.$http $http} service. ## Controller We simplified our sub-controllers (`PhoneListCtrl` and `PhoneDetailCtrl`) by factoring out the -lower-level {@link api/angular.module.ng.$http $http} service, replacing it with a new service called -`Phone`. Angular's {@link api/angular.module.ngResource.$resource `$resource`} service is easier to +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 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. @@ -122,7 +122,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/angular.module.ngResource.$resource $resource} service augments the response object +The {@link api/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` {@link -- cgit v1.2.3