Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 2 and Angular 2 on a same project

I have a simple question (i think ?)

I will start a new project for a mobile app, and an other developper wants to create the project with angular 2 CLI.

I get that Ionic 2 is build ON Angular 2, so there is no use if we want to do a mobile app to put Angular 2 (with bootstrap) AND Ionic 2 in the same project ?

Only the use of Ionic 2 is sufficient no ?

If this is not clear don't hesitate to let me know !

Thank you in advance to the community !

like image 243
foufrix Avatar asked Jul 27 '26 03:07

foufrix


1 Answers

If both codebases are trying to achieve the same thing (i.e. have the same data/service layers), then you have a few options.

  1. First build an Angular 2 app, then fork it and build a Ionic 2 mobile app from it. You will have to do some modifications to make it fit to Ionic 2, but it will not be too bad. You should choose this option if you can build things sequentially.
  2. Build a shared repository with the model/service/data layer and have the two projects maintain their own view concurrently. You should choose this option if you have to build things concurrently. This will probably be a bit harder to set up.
  3. Build an Angular2 app and then just wing it with Apache Cordova to re-use the same view. I would strongly suggest against this, since Ionic's view implementation is much nicer and cleaner than what you would come up with.
like image 175
Ajk_P Avatar answered Jul 28 '26 16:07

Ajk_P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!