From 9a21050b436011693e4eb7e3ace1300a1b0fd2d4 Mon Sep 17 00:00:00 2001
From: David Bennett
Date: Mon, 23 Sep 2013 21:45:48 -0400
Subject: docs(angular.Module): fix controller and directive method parameters
---
src/loader.js | 6 ++++--
src/ng/compile.js | 9 +++++----
src/ng/controller.js | 3 ++-
3 files changed, 11 insertions(+), 7 deletions(-)
(limited to 'src')
diff --git a/src/loader.js b/src/loader.js
index 915d338a..a239fa04 100644
--- a/src/loader.js
+++ b/src/loader.js
@@ -178,7 +178,8 @@ function setupModuleLoader(window) {
* @ngdoc method
* @name angular.Module#controller
* @methodOf angular.Module
- * @param {string} name Controller name.
+ * @param {string|Object} name Controller name, or an object map of controllers where the
+ * keys are the names and the values are the constructors.
* @param {Function} constructor Controller constructor function.
* @description
* See {@link ng.$controllerProvider#register $controllerProvider.register()}.
@@ -189,7 +190,8 @@ function setupModuleLoader(window) {
* @ngdoc method
* @name angular.Module#directive
* @methodOf angular.Module
- * @param {string} name directive name
+ * @param {string|Object} name Directive name, or an object map of directives where the
+ * keys are the names and the values are the factories.
* @param {Function} directiveFactory Factory function for creating new instance of
* directives.
* @description
diff --git a/src/ng/compile.js b/src/ng/compile.js
index 5cd220ef..3a72db58 100644
--- a/src/ng/compile.js
+++ b/src/ng/compile.js
@@ -168,10 +168,11 @@ function $CompileProvider($provide) {
* @description
* Register a new directive with the compiler.
*
- * @param {string} name Name of the directive in camel-case. (ie ngBind which will match as
- * ng-bind).
- * @param {function|Array} directiveFactory An injectable directive factory function. See {@link guide/directive} for more
- * info.
+ * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which
+ * will match as ng-bind), or an object map of directives where the keys are the
+ * names and the values are the factories.
+ * @param {function|Array} directiveFactory An injectable directive factory function. See
+ * {@link guide/directive} for more info.
* @returns {ng.$compileProvider} Self for chaining.
*/
this.directive = function registerDirective(name, directiveFactory) {
diff --git a/src/ng/controller.js b/src/ng/controller.js
index 0474e766..d6dedb9b 100644
--- a/src/ng/controller.js
+++ b/src/ng/controller.js
@@ -18,7 +18,8 @@ function $ControllerProvider() {
* @ngdoc function
* @name ng.$controllerProvider#register
* @methodOf ng.$controllerProvider
- * @param {string} name Controller name
+ * @param {string|Object} name Controller name, or an object map of controllers where the keys are
+ * the names and the values are the constructors.
* @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
* annotations in the array notation).
*/
--
cgit v1.2.3