MCPcopy Create free account
hub / github.com/angular/components / bootstrap

Function bootstrap

src/universal-app/prerender.ts:36–69  ·  view source on GitHub ↗
(context: BootstrapContext)

Source from the content-addressed store, hash-verified

34 });
35
36function bootstrap(context: BootstrapContext) {
37 return bootstrapApplication(
38 KitchenSink,
39 {
40 providers: [
41 {
42 provide: MATERIAL_ANIMATIONS,
43 useValue: {
44 animationsDisabled: true,
45 },
46 },
47 provideServerRendering(),
48 provideClientHydration(),
49 {
50 provide: AUTOMATED_KITCHEN_SINK,
51 useValue: !isDebugMode,
52 },
53 {
54 // If an error is thrown asynchronously during server-side rendering
55 // it'll get logged to stderr, but it won't cause the build to fail.
56 // We still want to catch these errors so we provide an ErrorHandler
57 // that rethrows the error and causes the process to exit correctly.
58 provide: ErrorHandler,
59 useValue: {
60 handleError: (error: Error) => {
61 throw error;
62 },
63 },
64 },
65 ],
66 },
67 context,
68 );
69}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected