Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Ionic, Second Edition

You're reading from   Learning Ionic, Second Edition Hybrid mobile apps with HTML5, CSS3, and Angular

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781786466051
Length 378 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Ravulavaru Ravulavaru
Author Profile Icon Ravulavaru
Ravulavaru
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Title Page
Credits
About the Author
Acknowledgements
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Dedication2
Preface
1. Angular - A Primer FREE CHAPTER 2. Welcome to Ionic 3. Ionic Components and Navigation 4. Ionic Decorators and Services 5. Ionic and SCSS 6. Ionic Native 7. Building the Riderr App 8. Ionic 2 Migration Guide 9. Testing an Ionic 2 App 10. Releasing the Ionic App 11. Ionic 3 12. Appendix

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

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 the chapter8 folder, open a new command prompt/terminal and run:

ionic start -a "TodoApp-v2" -i app.example.todoapp_v2 todoapp_v2...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images