From 57c43dd3762ea665125bff7e4727bce06a225b32 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Thu, 22 Aug 2013 12:32:42 -0700 Subject: docs(module): improve the installation instructions for optional modules Currently, the documentation does a bad job of explaining the distinction between the services that it provides, and the module itself. Furthermore, the instructions for using optional modules are inconsistent or missing. This commit addresses the problem by ading a new `{@installModule foo}` annotation to the docs generator that inlines the appropriate instructions based on the name of the module. --- src/ngResource/resource.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/ngResource') diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index 719fea5d..2434ad68 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -6,6 +6,16 @@ var $resourceMinErr = angular.$$minErr('$resource'); * @ngdoc overview * @name ngResource * @description + * + * # ngResource + * + * `ngResource` is the name of the optional Angular module that adds support for interacting with + * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources. + * `ngReource` provides the {@link ngResource.$resource `$resource`} serivce. + * + * {@installModule resource} + * + * See {@link ngResource.$resource `$resource`} for usage. */ /** @@ -20,16 +30,7 @@ var $resourceMinErr = angular.$$minErr('$resource'); * The returned resource object has action methods which provide high-level behaviors without * the need to interact with the low level {@link ng.$http $http} service. * - * # Installation - * To use $resource make sure you have included the `angular-resource.js` that comes in Angular - * package. You can also find this file on Google CDN, bower as well as at - * {@link http://code.angularjs.org/ code.angularjs.org}. - * - * Finally load the module in your application: - * - * angular.module('app', ['ngResource']); - * - * and you are ready to get started! + * Requires the {@link ngResource `ngResource`} module to be installed. * * @param {string} url A parametrized URL template with parameters prefixed by `:` as in * `/user/:username`. If you are using a URL with a port number (e.g. -- cgit v1.2.3