How to convert an existing Angular 2 web app to a native app script

After about a year, I've been working on an Angular 2 web app as a hobby and am now at a point where I can start testing. I was wondering how I can use my existing Angular 2 code and convert it to my own application script. I was looking for a native script, it looks like you should be using a native script from the beginning. I also use Angular cli and several npm packages to help me develop my application.

edited

+3


source to share


2 answers


You can reuse most of your scripts, but the templates and some styles must change as there is no HTML support and also some CSS properties that are not available.

There is a way to share code without creating a separate project, but with a module called nativescript-ngx-magic

, you can watch it here:



https://github.com/wwwalkerrun/nativescript-ngx-magic

Basically, it is that it allows you to have a native version and a regular web version in the same project, and it will automatically switch templates for you.

+1


source


you can use specific git repos for this, but the best and most practical is to follow the documentation that walks you through the conversion process to nativescripts. Follow this doc link https://docs.nativescript.org/angular/tutorial/ng-chapter-0



+1


source







All Articles