This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,8 @@ function setupModuleLoader(window) {
178
178
* @ngdoc method
179
179
* @name angular.Module#controller
180
180
* @methodOf angular.Module
181
- * @param {string } name Controller name.
181
+ * @param {string|Object } name Controller name, or an object map of controllers where the
182
+ * keys are the names and the values are the constructors.
182
183
* @param {Function } constructor Controller constructor function.
183
184
* @description
184
185
* See {@link ng.$controllerProvider#register $controllerProvider.register()}.
@@ -189,7 +190,8 @@ function setupModuleLoader(window) {
189
190
* @ngdoc method
190
191
* @name angular.Module#directive
191
192
* @methodOf angular.Module
192
- * @param {string } name directive name
193
+ * @param {string|Object } name Directive name, or an object map of directives where the
194
+ * keys are the names and the values are the factories.
193
195
* @param {Function } directiveFactory Factory function for creating new instance of
194
196
* directives.
195
197
* @description
Original file line number Diff line number Diff line change @@ -168,10 +168,11 @@ function $CompileProvider($provide) {
168
168
* @description
169
169
* Register a new directive with the compiler.
170
170
*
171
- * @param {string } name Name of the directive in camel-case. (ie <code>ngBind</code> which will match as
172
- * <code>ng-bind</code>).
173
- * @param {function|Array } directiveFactory An injectable directive factory function. See {@link guide/directive} for more
174
- * info.
171
+ * @param {string|Object } name Name of the directive in camel-case (i.e. <code>ngBind</code> which
172
+ * will match as <code>ng-bind</code>), or an object map of directives where the keys are the
173
+ * names and the values are the factories.
174
+ * @param {function|Array } directiveFactory An injectable directive factory function. See
175
+ * {@link guide/directive} for more info.
175
176
* @returns {ng.$compileProvider } Self for chaining.
176
177
*/
177
178
this . directive = function registerDirective ( name , directiveFactory ) {
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ function $ControllerProvider() {
18
18
* @ngdoc function
19
19
* @name ng.$controllerProvider#register
20
20
* @methodOf ng.$controllerProvider
21
- * @param {string } name Controller name
21
+ * @param {string|Object } name Controller name, or an object map of controllers where the keys are
22
+ * the names and the values are the constructors.
22
23
* @param {Function|Array } constructor Controller constructor fn (optionally decorated with DI
23
24
* annotations in the array notation).
24
25
*/
You can’t perform that action at this time.
0 commit comments