Skip to content

Commit 8bf1797

Browse files
petebacondarwinjamesdaily
authored andcommitted
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 angular#3692
1 parent 3cf9883 commit 8bf1797

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
@@ -1053,7 +1053,9 @@ function angularInit(element, bootstrap) {
10531053
* They must use {@link api/ng.directive:ngApp ngApp}.
10541054
*
10551055
* @param {Element} element DOM element which is the root of angular application.
1056-
* @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
1056+
* @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
1057+
* Each item in the array should be the name of a predefined module or a (DI annotated)
1058+
* function that will be invoked by the injector as a run block. See: {@link angular.module modules}
10571059
* @returns {AUTO.$injector} Returns the newly created injector for this app.
10581060
*/
10591061
function bootstrap(element, modules) {

0 commit comments

Comments
 (0)