-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Expand file tree
/
Copy pathdo_bootstrap.ts
More file actions
36 lines (34 loc) 路 1.02 KB
/
Copy pathdo_bootstrap.ts
File metadata and controls
36 lines (34 loc) 路 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ApplicationRef} from '../application/application_ref';
/**
* @description
* Hook for manual bootstrapping of the application instead of using `bootstrap` array in @NgModule
* annotation. This hook is invoked only when the `bootstrap` array is empty or not provided.
*
* Reference to the current application is provided as a parameter.
*
* See ["Bootstrapping"](/guide/ngmodules/overview#bootstrapping-an-application).
*
* @usageNotes
* The example below uses `ApplicationRef.bootstrap()` to render the
* `AppComponent` on the page.
*
* ```ts
* class AppModule implements DoBootstrap {
* ngDoBootstrap(appRef: ApplicationRef) {
* appRef.bootstrap(AppComponent); // Or some other component
* }
* }
* ```
*
* @publicApi
*/
export interface DoBootstrap {
ngDoBootstrap(appRef: ApplicationRef): void;
}