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

Commit e3371d7

Browse files
docs(angular.bootstrap): clarify modules parameter
It was not clear what you could pass to specify modules to load in the `module` parameter of this function. The `modules` parameter takes an array. The main case is to provide a String, which is the name of a "predefined" angular module. The side cases are to provide a Function (or an annotated function in the form of an Array), which will be invoked by the injector as a run block. It is not possible to "define" new modules via this parameter. Closes #3692
1 parent 9b2b93d commit e3371d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Angular.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,9 @@ function angularInit(element, bootstrap) {
10171017
* They must use {@link api/ng.directive:ngApp ngApp}.
10181018
*
10191019
* @param {Element} element DOM element which is the root of angular application.
1020-
* @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
1020+
* @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
1021+
* Each item in the array should be the name of a predefined module or a (DI annotated)
1022+
* function that will be invoked by the injector as a run block. See: {@link angular.module modules}
10211023
* @returns {AUTO.$injector} Returns the newly created injector for this app.
10221024
*/
10231025
function bootstrap(element, modules) {

0 commit comments

Comments
 (0)