Angular 2.0 Hits Beta, Brings Major Changes to the JavaScript Framework

Angular 2.0 has just hit beta stage. This brings major changes to the popular JavaScript structural framework including a new architecture, TypeScript for development, new templating syntax, and removal of version 1.x APIs. Angular 2 is very different from version 1.x, introduces many breaking changes, and is not backwards compatible. However, Angular 2.0 does include a number of improvements over version 1.x such as increased speed and performance, cross-platform, and modern browser support including Microsoft Edge.

AngularJS is a popular JavaScript structural framework by Google for building dynamic Web apps. It is compatible with desktop and mobile browsers and the framework is 100% client-side. AngularJS allows developers to use HTML as a template language and helps reduce the amount of code needed to build applications.

Details about Angular 2.0 were provided by Igor Minar and Tobias Bosch, Angular team members at Google, last October at the ngEurope conference. Reactions from developers shortly after the Angular 2.0 presentation at ngEurope were mostly negative, although there were some developers that supported the upcoming changes to AngularJS.

Much of the negative reaction had to do with the lack of backwards compatibility, the removal of version 1.x APIs, and the prospect of having to rewrite applications. The Angular 2.0 details made waves across the development community and was covered by many tech blogs with article titles such as "Can AngularJS Maintain Its Dominance?," "How Google broke the OSS compact with Angular 2.0," and "Angular 2.0 announcement backfires." There were some blog posts that viewed the upcoming Angular 2.0 more favorably. One blog post said that it was too soon to panic about Angular 2.0 and another blog post covered ten things to consider while keeping a level head about Angular 2.0.

This is not the first time members of the development community reacted to a change in an open source project. Earlier this year, Microsoft announced that the company plans on forking and extending Node.js, a Javascript runtime based on the Google Chrome V8 Javascript engine. The announcement was met with concern from some developers worried that Microsoft's extensions of Node.js would lead to Windows lock-in.

Angular 2.0 introduces a new architecture, TypeScript for development, new templating syntax, and a variety of improvements. In March of this year, Microsoft announced that Microsoft TypeScript and Google Angular teams have been collaborating on Angular 2.0 which is being built on TypeScript, a typed superset of JavaScript. Microsoft also announced that the company had been working with Google on merging TypeScript and AtScript.

Angular 2.0 drops several APIs from version 1.x including controllers, directive definition objects (DDO), $scope, angular.module, and jQlite. Although it appears that there is a specification for a single API under consideration. DOM Wrapper has also been dropped in Angular 2.0. Minar says in the ngEurope conference presentation that:

"So in 2.0, we're not going use DOM wrappers inside of the framework at all. We're just going to deal with raw DOM. The DOM has improved quite a bit since we started, so we don't actually need a compatibility layer that will help us with the different browsers as much as we used to need it. So we can just build with raw DOM. But if you want to deal with- if you want to use jQuery, if you find jQuery useful in your components, you can totally use that."

Angular 2.0 is very different from AngularJS version 1.x and since it is not backwards compatible most developers will have to rewrite portions of their applications if they want to upgrade to Angular 2.0. However, two methods have been created, ngUpgrade and ngForward, to make upgrading to 2.0 somewhat easier. Angular 2.0 aims to provide a new and improved development experience allowing developers to build dynamic mobile and desktop applications.

TJ VanToll, a senior developer advocate at Telerik, a Progress company, provided ProgrammableWeb a statement about Angular 2.0:

"The most important part of this new version of Angular for developers is that it is no longer limited to building apps inside the browser. Angular 2 is breaking that tie to the browser and making it possible for Angular to be used in other ecosystems. TypeScript brings a lot of productivity features that server-side developers love to the JavaScript world, such as type checking and API auto-completion. We at Telerik provide first-class TypeScript support in NativeScript, and having the same TypeScript support in Angular 2 makes it that much easier for us to integrate the two frameworks. The best thing is neither Angular 2 nor NativeScript depend on TypeScript, which means developers that want to use TypeScript get the benefits they're looking for, and those that don't aren't forced to use the language."

For more information about Angular 2.0, visit

Be sure to read the next Open Source article: Google Abandons Oracle's Java APIs for Open Source in Future Android Releases


Comments (0)