1

How do you create ionic projects with different versions of ionic?

I am able to create an Ionic 1 project by using --type=ionic1 flag in ionic-cli as mentioned here.

But how do we create an Ionic 2 project with ionic-cli 3? --type=ionic2 doesn't work as mentioned in this thread.

Any kind of help will be appreciated.

Thanks!

lotfi1991
  • 35
  • 5
Khusbu Mishra
  • 161
  • 4
  • 13
  • Does not work is not giving any details can you please add more information? Which error exactly you are getting ? – Vova Bilyachat Sep 05 '17 at 07:24
  • 2
    you cant create a "new" ionic2 project ... ionic 3 is just ionic2 + lazy loading.. it has semantic versioning just like angular. You can have either ionic1 or ionic-angular – Suraj Rao Sep 05 '17 at 07:29

1 Answers1

4

You cannot create ionic2 using ionic3 cli Reason ionic1 was on angular1x but angular 2 was not updated version of angular1x but new rewritten for angular and hence ionic updated them self to ionic2 which used angular2

now the angular4 was released it was not rewritten of angular2, it was updated version of angular2.Hence ionic3 was updated and now used angular4.

it means even if you have ionic2 project but you have ionic3 cli installed , yet you can run and compile without any problem.

conclusion. ionic1 is different and ionic2 == ionic3 + some new features such as lazy loading. Thr is no such need to create ionic2 project but if you familiar with angular1x and not angular2 you can create ionic1 project with ionic3 cli

Anil
  • 986
  • 10
  • 21
  • Thanks for the answer. But how do I create an Ionic project with a specific version of ionic framework no matter what my ionic-cli version is. Is that possible? This is required as I need to create one to test my plugin with different versions of Ionic. – Khusbu Mishra Sep 05 '17 at 11:11
  • 3
    see if you are using plugin from https://ionicframework.com/docs/native/fcm/ official doc all are supporting ionic3 . if you still wish to downgrade to ionic2 you ca use this. npm install -g ionic@2.2.2 – Anil Sep 05 '17 at 11:54