Now that we are done with our Ionic v1 Todo app, we will be looking at migrating the same to Ionic 2.
Note: If you were planning to migrate from Ionic 1 to Ionic 3, you would be following a similar approach.
The plan is simple; we are going to scaffold a new blank template using the --v2 flag and start putting stuff together. The following table would be a good starting point:
Component | Ionic 1 | Ionic 2 |
Ionic starter template | Blank | Blank |
Bootstrap application | ng-app | NgModule |
Navigation | State router | NavController |
Components | Templates and controllers | @Component |
Services/factory | Service provider | @Injectable Provider |
Persistence | Local storage | Storage API |
Device interaction | NgCordova | Ionic Native |
Local notifications | $cordovaLocalNotification service | LocalNotifications class |
Now that we are aware of the high level mapping, we will start by scaffolding a new blank template in v2.
Inside...