This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,8 @@ function setupModuleLoader(window) {
216
216
* @ngdoc method
217
217
* @name angular.Module#controller
218
218
* @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.
220
221
* @param {Function } constructor Controller constructor function.
221
222
* @description
222
223
* See {@link ng.$controllerProvider#register $controllerProvider.register()}.
@@ -227,7 +228,8 @@ function setupModuleLoader(window) {
227
228
* @ngdoc method
228
229
* @name angular.Module#directive
229
230
* @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.
231
233
* @param {Function } directiveFactory Factory function for creating new instance of
232
234
* directives.
233
235
* @description
Original file line number Diff line number Diff line change @@ -170,10 +170,11 @@ function $CompileProvider($provide) {
170
170
* @description
171
171
* Register a new directive with the compiler.
172
172
*
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.
177
178
* @returns {ng.$compileProvider } Self for chaining.
178
179
*/
179
180
this . directive = function registerDirective ( name , directiveFactory ) {
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ function $ControllerProvider() {
19
19
* @ngdoc function
20
20
* @name ng.$controllerProvider#register
21
21
* @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.
23
24
* @param {Function|Array } constructor Controller constructor fn (optionally decorated with DI
24
25
* annotations in the array notation).
25
26
*/
You can’t perform that action at this time.
0 commit comments