Migration plan
Now that we are done with our Ionic v1 Todo app, we will be looking at migrating the same to Ionic 2.
Note
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 |
|
Navigation | State router |
|
Components | Templates and controllers |
|
Services/factory | Service provider |
|
Persistence | Local storage | Storage API |
Device interaction |
| Ionic Native |
Local notifications |
| LocalNotifications class |
Now that we are aware of the high level mapping, we will start by scaffolding a new blank template in v2.
Inside the chapter8
folder, open a new command prompt/terminal and run:
ionic start -a "TodoApp-v2" -i app.example.todoapp_v2 todoapp_v2...