Paul Krill
Editor at Large

AngularJS 2 reaches release candidate

news
May 3, 20162 mins

The expected next steps for Google's framework are bug fixes followed by a general release of the upgrade

lorimerlite framework structure build construction
Credit: Astris1

AngularJS 2, the much-awaited follow-up to the initial release of the JavaScript Web framework, has reached a release candidate stage, moving the technology closer to general availability.

The upgrade to the Google-developed framework has been rewritten to support multiple renderers and is decoupled from the DOM. Microsoft’s TypeScript is the language of choice for the rewrite, which also has focused on use of components over directives for page rendering.

Google engineer Brad Green, who has worked on the project, said Angular 2 will have support for offline compilation. “This improves the first-time render performance of Angular 2 by about 2x and allows us to drop much of our framework size when you build for production,” he said.

Support for Google and Mozilla’s Progressive Web Applications, which attempt to provide a better experience for Web apps, will be offered as well. “The core technique here is in using Service Workers to automatically install your app and data in the user’s browser so it’s already there when the user comes back or wants to use it when offline. We’ll support this with instant starter apps through the Angular CLI,” Green said.

A new router in Angular 2 supports “lazy loading,” added Green. “When users come to the first view of your application, we’ll automatically only load the JavaScript modules that are required for that view.”

The release candidate repackages Angular into individual packages of one per each feature area, according to a bulletin on the release candidate. “All of the packages are now distributed under the @angular npm scope. This changes how Angular is installed via npm and how you import the code.”

The bulletin features instructions on installing Angular for a browser application and on importing symbols. Bug fixes and late-breaking changes are noted as well. Among the changes is one that involves use of context objects. “Before, a EmbeddedViewRef used to have methods for setting variables. Now, a user has to pass in a

Version 2 already has been in use at organizations like NPR, CapitalOne, and The Weather Channel. Angular is billed as offering “HTML enhanced for Web apps.” Misko Hevery, a co-author of Angular, has said its use of dependency injection sets it apart from other frameworks. It even is being paired with enterprise Java via the AngularBeans framework.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author