- Ionic: 3
- Angular: 5
- Ionic: 4
- Angular: 7 (Angular 8 is expected in May-19)
They will ship a major release every 6 months and provide active support on those major releases for next 6 months by shipping minor updates and patches.
Most of the updates and bug fixes to their platform is delayed as their first priority is to provide support to their paid subscribers rather than open source development.
Moving from ionic-cli to angular-cli:
- Angular-cli 6+ is far more advanced and feature loaded than current ionic-cli 3.
- Upgrading from 5 to 6 is a big step. But once updated to v6 all the future updates are made easy by using “ng update” command available in angular-cli 6+
Use of Web Components and angular-elements
- Allows using framework independent web components
Typescript 3.3 claims 50%-75% faster build times using “incremental file watching” technique. More new features to language and improved error reporting.
Reduced Build size:
- Uses “Tree-shaking” technique to remove dead/unused code and makes sure only the required code and assets goes in the production build.
Animations performance improvements:
- Angular team claims that they have removed “web animations polyfill” resulting in slightly improved animations.
Easier integration with official angular-material library which is maintained by core angular/google team.
Breaking changes in Angular:
- Angular, RxJS, Apollo, Typescript are tightly linked with one another.
- Angular 5, RxJS 5, Apollo 1, Typescript 2+ are compatible with each other.
- If any of above has to be updated then preferred compatible versions will be Angular 7+, RxJS 6+, Apollo 1.5, Typescript 3.1+
Breaking changes in Ionic components:
- Here’s the full list of breaking changes.
- Thankfully, there is a “migration linter” which can show all the warnings and errors in the code to ease developer’s job.
Breaking changes in RxJS:
- RxJS team has mostly worked on performance improvements. Now their library is more modular.
- As a result, these changes are related to import statements, syntax and renaming.
- RxJS team has introduced “rxjs-compat” to provide backward compatibility and a linter to highlight errors in the code which needs to be changed.
Breaking changes in Apollo:
- Apollo-angular 1.0 has been a bit of pain for us due to bugs in it and it’s compatibility. Upgrading to 1.5 will result in refactoring to remove the hacks which are currently in place to deal with bugs in 1.0
- Since Ionic 4 is framework independent it doesn’t have NavController like Ionic 3 and recommends to bring you own navigation.
- Angular can use angular-router, React can use react-router, and so on.
- This will be a significant amount of refactoring which was anyway required for easier long term maintenance.
- Ionic nav guards such as ionViewDidLoad, ionViewCanLeave, ionViewCanEnter are removed in ionic 4 hence needs to be replaced with angular route guards.
Third party open source ionic-3 libraries have gone quite and authors may not be interested in upgrading to ionic-4.
There might be better alternate availables of those libraries but it will involve significant effort in switching to them.
Ionic team is working on “Capacitor” which is supposed to replace or be an alternative of “Cordova”. Currently its in beta and isn’t mature enough for prod.
We should feature freeze the current release (might label it with legacy-ionic-3 app). Then for the next release create a fresh ionic-4 app and start migrating features one by one. More the number of features, more will be the complexity to migrate them. Hence it should not be delayed too much.
Finally, keep on regression testing ionic 4 app and once it is stable then shut down the v3 app and move to v4 app.
All the best!
- Ayush 🙂