Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 5bb9ba2

Browse files
dbinitbtford
authored andcommitted
docs(angular.Module): fix controller and directive method parameters
1 parent e5eeb2e commit 5bb9ba2

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/loader.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ function setupModuleLoader(window) {
216216
* @ngdoc method
217217
* @name angular.Module#controller
218218
* @methodOf angular.Module
219-
* @param {string} name Controller name.
219+
* @param {string|Object} name Controller name, or an object map of controllers where the
220+
* keys are the names and the values are the constructors.
220221
* @param {Function} constructor Controller constructor function.
221222
* @description
222223
* See {@link ng.$controllerProvider#register $controllerProvider.register()}.
@@ -227,7 +228,8 @@ function setupModuleLoader(window) {
227228
* @ngdoc method
228229
* @name angular.Module#directive
229230
* @methodOf angular.Module
230-
* @param {string} name directive name
231+
* @param {string|Object} name Directive name, or an object map of directives where the
232+
* keys are the names and the values are the factories.
231233
* @param {Function} directiveFactory Factory function for creating new instance of
232234
* directives.
233235
* @description

src/ng/compile.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,11 @@ function $CompileProvider($provide) {
170170
* @description
171171
* Register a new directive with the compiler.
172172
*
173-
* @param {string} name Name of the directive in camel-case. (ie <code>ngBind</code> which will match as
174-
* <code>ng-bind</code>).
175-
* @param {function|Array} directiveFactory An injectable directive factory function. See {@link guide/directive} for more
176-
* info.
173+
* @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
174+
* will match as <code>ng-bind</code>), or an object map of directives where the keys are the
175+
* names and the values are the factories.
176+
* @param {function|Array} directiveFactory An injectable directive factory function. See
177+
* {@link guide/directive} for more info.
177178
* @returns {ng.$compileProvider} Self for chaining.
178179
*/
179180
this.directive = function registerDirective(name, directiveFactory) {

src/ng/controller.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ function $ControllerProvider() {
1919
* @ngdoc function
2020
* @name ng.$controllerProvider#register
2121
* @methodOf ng.$controllerProvider
22-
* @param {string} name Controller name
22+
* @param {string|Object} name Controller name, or an object map of controllers where the keys are
23+
* the names and the values are the constructors.
2324
* @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
2425
* annotations in the array notation).
2526
*/

0 commit comments

Comments
 (0)