Ionic 4 Upgrade: Updating From Ionic 3 to Ionic 4/Angular 6
Ionic 4 is not yet released (Alpha) but you can upgrade your Ionic 3 project to use Ionic/Angular v4 as of this moment if you are comfortable using alpha code. The Ionic CLI 4 is also in R.C version and you can use it to generate Ionic 4/Angular 6 projects and use them as the base to migrate your Ionic 3 apps. In this Ionic 4 migration guide, we'll see by a simple example how you can update a demo Ionic 3 project to Ionic 4.
Creating a New Ionic 4 Project
Before you can create a new Ionic 4 project go ahead and install the latest version of Ionic CLI (v4) using the following command from your terminal:
npm install -g ionic@rc cordova
After installing the Ionic CLI 4. You can now run the following command to generate a new Ionic 4 project based on Angular 6:
ionic start ionic4upgradedemo blank --type=angular
Creating a new Ionic 4 project based on Angular is the first step toward migrating your Ionic 3 application to Ionic 4 (with Angular). To generate a project based on Angular we are using
We are also specifying the blank starter template but you can use sidemenu or tabs templates depending on what your Ionic 3 application is using for easing the migration process.
When writing this tutorial, only Angular is supported with the
If you look at the directory structure of your Ionic 4 project you'll see that's similar to Angular 6 projects except for some differences specific to Ionic.
First, you need to notice that pages and other things in Ionic 3 that live under the
src folder now live under the
src/app folder in Ionic 4.
Note: We also publish our tutorials on Medium and DEV.to. If you prefer reading in these platforms, you can follow us there to get our newest articles.
You can reach the author via Twitter:Follow @ahmedbouchefra
About the author
Get our Learn Angular 8 in 15 Easy Steps ebook in pdf, epub and mobi formats, plus a new Angular 8 tutorial every 3 days.
Angular 9/8 Topics
Read our other tutorials
- Angular Tutorial
- Laravel 6 Tutorial
- React Tutorial
- React Hooks Tutorial
- React Native Tutorial
- Webpack Tutorial
- PHP Tutorial
- Django Tutorial
- Java Spring Tutorial
- Rails 6 Tutorial
- Ionic 4 Tutorial
- TypeScript Tutorial
- Bootstrap 4 Tutorial
- Electron Tutorial
- Cordova Tutorial
- HTML Tutorial
- GraphQL Tutorial
- CSS Grid Layout Tutorial
- PWA Tutorial