Credit: Chris Potter
There is no precise general release date yet, Misko Hevery, a co-author of Angular and tech lead for version 2, said in an email. An upgrade path, however, has been unveiled in a recent blog post. "Developers will be able to upgrade their AngularJS 1 apps to Angular 2 apps in a predictable way," Hevery said. "So if someone wants to upgrade, there will be a clear incremental way to get there."
A rewrite of the framework was necessary because of the inclusion of technologies such as Web Components, Hevery said. "It is not possible to add the latest technologies into AngularJS 1 without total rethink," he said. "For this reason, we chose to start from scratch, as we believe it will result in a significantly better experience for the developers."
A "typical" upgrade from an Angular 1 project to Angular 2 would have developers including Angular 2 and ng-upgrade libraries with an existing application. Developers would pick components and services to migrate and take other steps, such as editing an Angular 1 directive’s template to conform to Angular 2 syntax.
Developers will be able to mix Angular 1 and 2 in the same application and mix Angular 1 and 2 components in the same view. Angular 1 and 2 can inject services across frameworks, and data binding will work across frameworks.
Version 2, the blog post said, provides many benefits over version 1, including "dramatically better" performance, more powerful templating, easier debugging, and simpler APIs. Faster change detection and support for reactive programming will also be featured.
Angular 2's rendering has been decoupled from the DOM. Builders of the platform are working on capabilities enabled by this decoupling, including server-side rendering, for fast initial render and Web-crawler support, and Web Workers, for moving an app and most of Angular to a Web Worker thread for a responsive UI. Native mobile UI capabilities also would be boosted by the decoupling. "We're enthusiastic about supporting the Web platform in mobile apps. At the same time, some teams want to deliver fully native UIs on their iOS and Android mobile apps," the post said.
Sign up for CIO Asia eNewsletters.