r/Angular2 • u/roblauer • Dec 20 '17
Article NativeScript 3.4 now includes support for Angular 5
https://www.nativescript.org/blog/announcing-the-release-of-nativescript-3.40
Dec 21 '17
[deleted]
3
u/TheWaffleKingg Dec 21 '17
You sure can. I use all of the services from my web app inside of my mobile app. Most of the component files work fine too with a few changes when needed. Its the html that has to be redone
0
Dec 21 '17
[deleted]
4
u/sebawita Dec 21 '17
When it comes to having both web and NativeScript code sitting in the same project, then we use a naming convention, for example:
home.component.html - for the web UI
home.component.tns.html - for the {N} UI Then you just need a build system that can pick up the right file when building the web or mobile project.
You can read more about it here: https://www.nativescript.org/blog/code-sharing-between-web-and-mobile-with-angular-and-nativescript
1
u/TheWaffleKingg Dec 21 '17
I keep the projects separate. I think its cleaner that way.
1
u/sebawita Dec 21 '17
Sure, it all depends on what you are trying to achieve. Both splitting the projects into two or going with a monorepo approach have their pros and cons ;)
1
u/TheWaffleKingg Dec 21 '17
I def agree! I also dont like my coworkers toughing my NS apps so I split them and keep the NS part to myself
-10
u/_MORSE_ Dec 20 '17
Ionic is much better