I’m just starting with nativescript and angular2. I tried to play around a bit and I already have this question for you:
As I have mixed views in my code, the regular ng2-web and the ng2-nativescript ones, I’d like to bootstrap my app properly when the front kickstarts. My initial intuition is, from within main.ts, detect the execution environment, and according to it bootstrap and import the right app modules.
How can I know that the code is being executed from the tns run command line and not from ng serve or nodejs? Also, I need this detection to persist until the final android/ios app build of course.
Thanks for your insights!