Creating an APK from an Angular 2 Application

Assuming I built an Angular 2 application and I also want to create an Android application for it, what would be the most efficient way to do this?

I am using Angular 2 with the CLI tool to build my application, using ng build -prod to deploy it on the web.

I searched googling and found this: https://docs.nativescript.org/tutorial/ng-chapter-0

I'm looking for the best way to do this to save time, these are my options (feel free to let me know about any other ..):

  • Build your own Android app using Android Studio. Then I need to update the android and Angular 2 files separately (the API remains the same, the API is the same for both)

  • using nativescript as above

  • in any other way or suggestion to make my angular2 app available for android / ios?

+4
source share
1 answer

Requirements There are only a few requirements for the successful completion of this project.

Node.js 4+

NativeScript 2.1 +

Angular CLI

Android SDK, Xcode, or both

Node.js comes with a very important tool called Node Package Manager (NPM). With it, we can get all the dependencies for both the Angular 2 web application and the NativeScript mobile application.

Angular 2 support did not appear in NativeScript until version 2.0. Finally, to create Android or iOS, you need various SDK platforms.

0
source

Source: https://habr.com/ru/post/1656199/


All Articles