If you are just starting with Angular, should you learn Angular 1.x or Angular 2.0? There are numerous resources available for all versions of Angular, but there’s only one version that you can pick for your first project. Which is the right one?
Also, you may have heard that Angular 2.0 is a significant departure from 1.x. Should you attempt to stay ahead of the curve and start with Angular 2.0? Which version will give you the best browser support? There is much to consider so this post is a summary of what I’ve found and what I recommend.
Angular 2.0 is Coming
Potentially the biggest question for Angular 2.0 pertains to the release date. Both Shawn Wildermuth and Craig McKeachie note that they expect Angular 2.0 to be released in late 2015. I haven’t seen an official date from the Angular team (maybe I’m missing it somewhere), however Brad Green provided some hints at the recent 2015 ng-conf keynote. Apparently, some teams at Google will start migrating their applications from Angular 1.x to Angular 2.0 starting in May 2015. He continues, “we are going to take the learnings from (this) and the feedback from all of you who use Angular 2.0 to determine when we are done and we can call it ready”. It is plausible that a fully-baked release of Angular 2.0 will be here in a matter of months. That being the case, you will at least want to pay attention to its progress.
However, take a look at the Angular 2.0 download page. The current build is listed as alpha. While alpha builds can be valuable for evaluating new features and improvements, they can be problematic for learning. You can reasonably expect to run into bugs or even find a drastically redesigned API by the time the first release candidate hits. As someone starting to learn a framework, you have an uphill battle already without the framework pushing against you.
Continued Angular 1.x Support
Also during the ng-conf 2015 keynote, the Angular team clarified they will not immediately seek to abandon Angular 1.x. While the team wants to super-heroically move the web forward, they are going to measure the traffic between the Angular 1.x website and the Angular 2.0 website to help determine 1.x support. Presumably if 1.x continues to show traction, they will continue supporting it. After the announcement of Angular 2.0, both K. Scott Allen and Dan Wahlin posted their thoughts. In summary, they can recommend continuing to use Angular 1.x going forward no matter the verdict with Angular 2.0. For some applications, it doesn’t make sense to invest time and money in a big migration. Therefore as an Angular developer, you should be prepared to maintain existing Angular 1.x applications for some time to come.
The Angular team is also considering the migration path. The Angular 2.0 router will be compatible with 1.x. The team also plans to offer several migration options and John Papa has volunteered to help create the migration guide. This points to an important skill for Angular developers to adopt in the not-so-distant future – migrating from 1.x to 2.0. In the short term, development teams will have valid options to stick with 1.x or move to 2.0 but the Angular team’s goal is to make it very attractive for teams to migrate. Therefore you should hone your skills accordingly and consider that you will likely need to know multiple framework versions.
Internet Explorer 8 Support
If you need to support IE 8, know that Angular 1.3 drops support for it. Being an ASP.NET developer who currently supports IE 8, I thought this was a deal breaker. But while there is no explicit support for IE 8 in Angular 1.3, it hasn’t been explicitly removed either and depending on what you do with Angular 1.3, it could still work.
Skimming through the migration guide from Angular 1.2 to 1.3, it appears certain, less-reliable, pieces of the API were deprecated. Potentially by starting with 1.3, you would write more reliable Angular code even if you eventually back port the project to 1.2 for specific IE 8 support at a later date. The guide also notes that 1.3 will require shims to work correctly in IE 8 which is only a minor hurdle. Another sign of hope for IE 8 support is this GitHub project which forked the Angular 1.3 source code with the intention of preserving IE 8 support – go community!
By no means is this a one-size-fits-all decision but if you’re just starting to learn Angular, the latest version of 1.3 is most likely the best with which to start. It’s capabilities are well-understood. It’s also stable and the browser support appears sufficient. Of course when 1.4 is released, you should re-evaluate. And finally, track the progress of Angular 2.0 and consider evaluating it after you get your feet wet with Angular 1.3.
In the next post, I’ll detail my favorite resources for learning Angular quickly and discuss strategies for mastering the material.