|
1 | 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata)
|
2 | 2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform";
|
3 | | -import { AppOptions } from "nativescript-angular/platform-common"; |
4 | | - |
5 | 3 | import { AppModule } from "./app.module";
|
6 | 4 |
|
7 | | -let options: AppOptions = {}; |
8 | | - |
9 | | -if (module["hot"]) { |
10 | | - options.hmrOptions = { |
11 | | - moduleTypeFactory: () => AppModule, |
12 | | - livesyncCallback: (platformReboot) => { |
13 | | - setTimeout(platformReboot, 0); |
14 | | - }, |
15 | | - } |
16 | | - |
17 | | - module["hot"].accept(["./app.module"], () => { |
18 | | - // Currently the context is needed only for application style modules. |
19 | | - const moduleContext = {}; |
20 | | - global["hmrRefresh"](moduleContext); |
21 | | - }); |
22 | | -} |
23 | | - |
24 | | -// A traditional NativeScript application starts by initializing global objects, setting up global CSS rules, creating, and navigating to the main page. |
25 | | -// Angular applications need to take care of their own initialization: modules, components, directives, routes, DI providers. |
26 | | -// A NativeScript Angular app needs to make both paradigms work together, so we provide a wrapper platform object, platformNativeScriptDynamic, |
27 | | -// that sets up a NativeScript application and can bootstrap the Angular framework. |
28 | | -platformNativeScriptDynamic(options).bootstrapModule(AppModule); |
| 5 | +platformNativeScriptDynamic().bootstrapModule(AppModule); |
0 commit comments