_From @zackarychapple on November 22, 2016 16:17_
I have an angular-cli generated angular2 app and its structure differs from the tns generated structure. I have been trying to figure out how can I change where tns looks for the main.ts to bootstrap the application. The goal is to have the web and native app living in the same repo and control switching between them via which main.ts is bootstrapped.
Both
--ng flag_Copied from original issue: NativeScript/NativeScript#3151_
_From @bradmartin on November 23, 2016 3:48_
@zackarychapple - does this seed project help any? https://github.com/NathanWalker/angular-seed-advanced there is another seed too, just don't recall the repo right now.
@zackarychapple here is another great x-platform seed project:
https://github.com/shripalsoni04/nativescript-angular-web-starter
Hey there, @zackarychapple! Great idea for having separate entry points for native and web ng2 app. You can change the main file for nativescript-angular from the package.json in the app folder. Simply change the following line:
"main": "main.js",
to something like:
"main": "main.tns.js",
or whatever you named your entry point.
Closing due to inactivity.
Please, reopen if needed.
Most helpful comment
Hey there, @zackarychapple! Great idea for having separate entry points for native and web ng2 app. You can change the main file for nativescript-angular from the
package.jsonin theappfolder. Simply change the following line:to something like:
or whatever you named your entry point.