Skip to content

Commit d241438

Browse files
docs(guide/bootstrap): add info about deferred bootstrap
1 parent 3328d33 commit d241438

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/content/guide/bootstrap.ngdoc

+15
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,18 @@ This is the sequence that your code should follow:
111111

112112
2. Call {@link api/angular.bootstrap} to {@link compiler compile} the element into an
113113
executable, bi-directionally bound application.
114+
115+
## Deferred Bootstrap
116+
117+
This features enables tools like Batarang and test runners to
118+
hook into angular's bootstrap process and sneak in more modules
119+
into the DI registry which can replace or augment DI services for
120+
the purpose of instrumentation or mocking out heavy dependencies.
121+
122+
If `window.name` contains prefix `NG_DEFER_BOOTSTRAP!` when
123+
{@link api/angular.bootstrap} is called, the bootstrap process will be paused
124+
until `angular.resumeBootstrap()` is called.
125+
126+
`angular.resumeBootstrap()` takes an optional array of modules that
127+
should be added to the original list of modules that the app was
128+
about to be bootstrapped with.

0 commit comments

Comments
 (0)