This is a migrated thread and some comments may be shown as answers.

Same code Angular2 & NativeScript for web/mobile ?

1 Answer 95 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hachim
Top achievements
Rank 1
Hachim asked on 06 Dec 2016, 06:37 PM

Hello !

I just started learning NativeScript with Angular 2 and i was wondering is it possible to deploy 2 applications (one for the mobile and the other for the web) using the same project or should I create another project for each platform and copy/past the code with making some changes.

I know this is a kinda dumb question but I need an answer to it because it drive me crazy.

Thanks your very much for your answers !

1 Answer, 1 is accepted

Sort by
0
Nick Iliev
Telerik team
answered on 07 Dec 2016, 08:50 AM
Hello  Jabri,

Thank you for your interest in NativeScript! Your question is right on point as many web developers
want to reuse their skills and code and create a common base for both mobile and web applications.

The short answer to your question is Yes you can do it! However, this is not an out-fo-the-box task and needs some additional preparations. There are some great projects created by the community. If you are interested in this techniques I would recommend these links:
https://www.nativescript.org/blog/sharing-code-between-web-and-native-apps-with-angular-2-and-nativescript
https://github.com/NathanWalker/angular-seed-advanced
https://github.com/NathanWalker/nativescript-ng2-magic

Regards,
Nikolay Iliev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Hachim
Top achievements
Rank 1
Answers by
Nick Iliev
Telerik team
Share this question
or