Last active
June 30, 2022 04:08
-
-
Save NathanWalker/d1a06cbd4a21fb12e076a4bbb97d57bd to your computer and use it in GitHub Desktop.
NativeScript for Angular bootstrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
platformNativeScript, | |
runNativeScriptAngularApp, | |
} from "@nativescript/angular"; | |
import { AppModule } from "./app/app.module"; | |
// runs the NativeScript application, nothing is bootstrapped yet, as we're only setting up the platform and callbacks | |
runNativeScriptAngularApp({ | |
// this function will be called when we need to display the application UI | |
// a major difference from the web is that this module may be destroyed when the user leaves the application and recreated when the user opens it again | |
// so remember to implement all the needed ngOnDestroy to cleanup any events that were bound here! | |
appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule), | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment