-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathmain.ts
More file actions
39 lines (34 loc) · 1.19 KB
/
main.ts
File metadata and controls
39 lines (34 loc) · 1.19 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
37
38
39
import {
bootstrapApplication,
provideNativeScriptHttpClient,
provideNativeScriptNgZone,
provideNativeScriptRouter,
runNativeScriptAngularApp,
} from '@nativescript/angular';
import { Trace, Utils } from '@nativescript/core';
// import { AppModule } from './app/app.module';
import { withInterceptorsFromDi } from '@angular/common/http';
import { AppComponent } from './app/app.component';
import { routes } from './app/app.routes';
import { provideZonelessChangeDetection } from '@angular/core';
const ZONELESS = true;
Trace.enable();
Trace.setCategories('ns-route-reuse-strategy,ns-router');
runNativeScriptAngularApp({
appModuleBootstrap: () => {
if (__APPLE__) {
Utils.ios.setWindowBackgroundColor('#a6120d');
}
return bootstrapApplication(AppComponent, {
providers: [
provideNativeScriptHttpClient(withInterceptorsFromDi()),
provideNativeScriptRouter(routes),
ZONELESS ? provideZonelessChangeDetection() : provideNativeScriptNgZone(),
],
});
},
});
// Comment above and Uncomment below to try without custom NgZone:
// runNativeScriptAngularApp({
// appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule),
// });