AngularJS 2 reaches release candidate

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

AngularJS 2 reaches beta
Credit: Astris1/Wikimedia

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.

This story, "AngularJS 2 reaches release candidate" was originally published by InfoWorld.

Related:
ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon