|
6 | 6 |
|
7 | 7 | (function() {'use strict';
|
8 | 8 |
|
| 9 | + |
| 10 | +function isFunction(value) { |
| 11 | + return typeof value === 'function'; |
| 12 | +} |
| 13 | + |
9 | 14 | /**
|
10 | 15 | * @description
|
11 | 16 | *
|
@@ -271,6 +276,18 @@ function setupModuleLoader(window) {
|
271 | 276 | */
|
272 | 277 | constant: invokeLater('$provide', 'constant', 'unshift'),
|
273 | 278 |
|
| 279 | + /** |
| 280 | + * @ngdoc method |
| 281 | + * @name angular.Module#decorator |
| 282 | + * @module ng |
| 283 | + * @param {string} The name of the service to decorate. |
| 284 | + * @param {Function} This function will be invoked when the service needs to be |
| 285 | + * instantiated and should return the decorated service instance. |
| 286 | + * @description |
| 287 | + * See {@link auto.$provide#decorator $provide.decorator()}. |
| 288 | + */ |
| 289 | + decorator: invokeLaterAndSetModuleName('$provide', 'decorator'), |
| 290 | + |
274 | 291 | /**
|
275 | 292 | * @ngdoc method
|
276 | 293 | * @name angular.Module#animation
|
@@ -339,7 +356,20 @@ function setupModuleLoader(window) {
|
339 | 356 | * @description
|
340 | 357 | * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
|
341 | 358 | */
|
342 |
| - directive: invokeLater('$compileProvider', 'directive'), |
| 359 | + directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'), |
| 360 | + |
| 361 | + /** |
| 362 | + * @ngdoc method |
| 363 | + * @name angular.Module#component |
| 364 | + * @module ng |
| 365 | + * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp) |
| 366 | + * @param {Object} options Component definition object (a simplified |
| 367 | + * {@link ng.$compile#directive-definition-object directive definition object}) |
| 368 | + * |
| 369 | + * @description |
| 370 | + * See {@link ng.$compileProvider#component $compileProvider.component()}. |
| 371 | + */ |
| 372 | + component: invokeLaterAndSetModuleName('$compileProvider', 'component'), |
343 | 373 |
|
344 | 374 | /**
|
345 | 375 | * @ngdoc method
|
|
0 commit comments