Google has been hard at work on Angular.js version 2 for more than two years now. The final version of this JavaScript cross-platform framework was released yesterday, and with it come scores of changes that will expand developer options. These included a newly componentized base, full support for TypeScript and ECMAScript 6, and better dependency injection.
Angular was built with both mobile and web application development in mind, and version 2 reinforces this philosophy. In previous versions, controllers were used to handle the insertion of custom HTML tags into an application. With Angular 2, this practice is replaced with components, which eliminate a lot of ceremonial code associated with controllers.
The new version of Angular makes the full jump into TypeScript as well. Microsoft’s typed superset of JavaScript, TypeScript, brings ECMAScript 2015 features to Angluar 2. This makes Angular scalable and introduces type annotations.
(Related: NativeScript 2.0 brings mobile strategy options for AngularJS developers)
Data binding has also been made easier by swapping out ng-directives in favor of a simpler syntax that wraps DOM element properties in square brackets. Events have had a similar transformation with parentheses replacing the ng-directives.
The Angular team took time after the release to address the community and lay out some of their plans for the future of the platform. During the development process, there were seven release candidates and hundreds of beta and alpha releases. The Angular team stated that from today forward, Angular releases will have semantic versioning.
That means patches will be divided into three categories: major, minor and patch. Major versions will apply to incompatible API changes; minor will signify functionality additions that are backward compatible; and patch will mean backward-compatible bug fixes.
The Angular team expects bug fixes to be coming to the platform soon. The team is also working on more features for Angular 2, such as more work animations, an update to Angular Material to version 2, and the addition of Web Workers.