-
Notifications
You must be signed in to change notification settings - Fork 0
/
main-standalone.ts
28 lines (24 loc) · 1.04 KB
/
main-standalone.ts
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
import { provideHttpClient } from '@angular/common/http';
import { NgZone, ɵNoopNgZone as NoopNgZone, provideZoneChangeDetection } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { provideRouter } from '@angular/router';
import { AppComponent } from './app/app.component';
import { appRoutes } from './app/app-routes';
bootstrapApplication(AppComponent, {
providers: [
provideHttpClient(),
provideRouter(appRoutes),
provideZoneChangeDetection({
// https://angular.io/api/core/BootstrapOptions#ngZoneEventCoalescing
// eventCoalescing: true,
// https://angular.io/api/core/BootstrapOptions#ngZoneRunCoalescing
// runCoalescing: true,
}),
/**
* Hack to use `NoopNgZone` with `bootstrapApplication` method.
* https://angular.io/api/core/BootstrapOptions#ngZone
* Note: uncomment `ChangeDetectorRef` patching in the `app.component.ts` for proper work.
*/
// { provide: NgZone, useClass: NoopNgZone },
],
}).catch(error => console.error(error));