Reputation: 24462
Assuming I built Angular 2 app and I want to build an Android app for it too, what would be the most efficent way to do it?
I'm using Angular 2 with the CLI tool to build my app, using ng build --prod to deploy it to web.
I've been googling and found this: https://docs.nativescript.org/tutorial/ng-chapter-0
I'm looking for the best way to do it to save time, those are my options (feel free to let me know about any other..):
Build android native app using Android studio. Then I need to update both android files and angular 2 files seperately (the API stays the same, the API is equally for both)
using Nativescript as linked above
any other way or suggestion by you to make my angular2 app available for android/ios?
Upvotes: 4
Views: 3728
Reputation: 897
You ought to use Ionic Framework intended for compiling APK
from Angular2
sources.
There is another more low-level tool: Apache Cordova Project
Upvotes: 1
Reputation: 3627
The Requirements There are only a few requirements to make this project successful.
Node.js 4+
NativeScript 2.1+
Angular CLI
The Android SDK, Xcode, or both
Node.js ships with a very important tool called the Node Package Manager (NPM). With it we can get all dependencies for both the Angular 2 web application and NativeScript mobile application.
Angular 2 support didn’t become available in NativeScript until version 2.0. Finally, to build for Android or iOS you need the various platform SDKs.
Upvotes: 0