Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share code between web-app (Angular2) and mobile app (Ionic 2)

I'm new to these technologies so forgive me if some of my questions don't make sense!

I have to develop both a web app and a mobile app for my company. I was thinking about Ionic 2 since it uses Angular 2, and I would like to share code between the web-app I'll build with angular 2 and the mobile app with Ionic 2 since they'll do almost the same things.

How should I do that? I'd like to keep the logic of the application the same, and I would just modify something about the UI. Thank you!

like image 766
Michele Stieven Avatar asked May 13 '16 09:05

Michele Stieven


1 Answers

You're in luck.

With Ionic 2 (Angular 2) you can just simply take all the code from the www folder and place it on your web server and you're done.

Sure, you may tweak styling a bit, but then again it's not mandatory.

Truth be told, this can be done with Ionic 1 as well. However, it's not officially supported, but with Ionic 2 it is.

like image 113
Nikola Avatar answered Sep 23 '22 17:09

Nikola