After a long, long time and about five seasons I have started watching the ever popular Game of Thrones. I can finally jump on the bandwagon and make my own poor attempt at rehashing a tired old meme:
AngularJS 2.0, which will likely be released within a year, will involve massive changes to the existing framework.
” [The] AngularJS team has been busy working on AngularJS 2.0. As we mentioned before, this is not a complex major update; this is a whole rewrite!” – ng-learn.org
Since Ionic is built on top of Angular, this also means big changes for Ionic. So I want to discuss a few issues this brings up and concerns existing Ionic developers, like me, might have.
Before I get started I’d like to put your mind at ease. If you are worried about using Ionic because of this or are worried that time you have spent learning Ionic will be wasted, fear not. Not only will Ionic support Angular 2.0 with Ionic 2.0 but they will also be continuing to support Ionic 1.x which will implement Angular 1.x.
I’m reasonably new to Ionic and Angular myself, and went into learning both knowing that this change was coming. I plan on upgrading to Ionic 2.0 and Angular 2.0 when they come out, but it’s good to know that we will be able to support our existing projects if we choose not to upgrade.
What is changing in Angular and why?
A lot. I’m not nearly intimate enough with Angular to make any criticisms or judgement on the new approach, but there’s certainly been quite a bit of backlash from the community. Many people are frustrated that the framework is changing so drastically and many people also question whether it is for the best.
For those short on time, some key changes so far in Angular 2 are:
- Removal of Controllers
- Removal of Directive Definition Object
- Removal of $scope
- Removal of angular.module
- Removal of jqLite
- Syntax changes
- Existing Angular applications will not work on Angular 2.0
- Uses ES6 (Ecmascript 6)
But for a more in depth discussion on the matter I would recommend reading this. The changes that are being made are being done to improve and future proof the framework. Personally, I’d prefer to be using a framework that is thinking too far forward rather than not moving forward at all, but I am not as heavily invested as some others and won’t need to relearn as much.
How will Angular 2.0 effect Ionic?
The Ionic team are at the forefront of Angular 2.0 development and have been in close contact with the Angular team in preparing for Angular 2.0.
If you plan on upgrading to Ionic 2.0 when it comes out then you will likely have a significant amount of relearning to do. When you’re building Ionic apps you’re mostly programming in Angular, so you will need to adapt to these massive changes in the framework.
To make the transition easier for those who are planning to upgrade, here’s some advice from the Ionic team:
Not everything is changing and a lot will still be the same though, a lot of the directives will remain the same and they have even hinted at an automatic upgrade tool:
So what does this all mean for you right now?
Not a whole lot. Keep learning Angular 1 and Ionic and building cool mobile apps. If you want to jump on to Ionic 2.0 as soon as it’s released then maybe keep up with the Angular news and read a few articles about potential changes. But for the most part, it’s business as usual.
If you’re new to Ionic and Angular and want a bit of a kick start, make sure to check out Mobile Development for Web Developers.