The Angular team has released the first beta version of Angular 2. There are still a few things to finish before the final release, but the beta gives developers a solid ground to build their apps upon.
The road towards Angular 2 has been long and winding. InfoQ first wrote about it in March of 2014 and we've tracked its progress since. Though version 2 uses some of the same nomenclature and concepts, many of the building blocks of an Angular 1 app don't exist in Angular 2. It remains to be seen how the community will respond to the new version.
In a blog post announcing the release, Angular manager Brad Green said, "Beta means we're now confident that most developers can be successful building large applications using Angular 2."
Angular 2 went through 55 alphas, and developers that followed along dealt with constant breaking changes. In the beta, a breaking changes will be handled with more care. Instead of simply changing a feature, the change will be phased in. In an interview on Angular Air, Misko Hevery described the process:
Going forward, when there are going to be breaking changes, we will make sure that we have a deprecation story. So, we'll go through a period where both of the changes work and finally deprecate the old one."
Igor Minar added,
We don't plan to make many major breaking changes. The beta is the period of time for us to absorb feedback, to have people try Angular 2 see how well it works, what works, what doesn't. Based on the feedback, [we'll ask] are these changes worth making and, if they are, we'll have the deprecation story, we'll deprecate some of the APIs.
One of the biggest changes that occurred prior to the beta was moving away from kebab-case to camelCase in HTML templates. The kebab case was originally a workaround because the HTML parser in browsers converts everything to lower case. To accomplish some of their other goals, the Angular team had to build their own template parser. In doing so, they were able to make it case sensitive, thus the property names in HTML now match their JavaScript counterparts.
Beyond just the normal refinement stage of a beta, Green mentioned five items they want to finish up prior to release:
- Reducing Angular 2's payload size.
- Making the Angular CLI usable end to end throughout the development process.
- Creating a more developer-friendly route definition and link API for the Component Router.
- Support for animations.
- I18n and L10n support.
"The final release date really depends on the feedback and how things go," Minar said.
In a discussion on Hacker News, user segphault sounded a positive note:
Angular 2 addresses a lot of the serious shortcomings in Angular 1.x. The Angular 2 approach to components and encapsulation feels cleaner and less complicated than the previous mess of services, factories, and directives. Though initially skeptical of Typescript, I've found that Angular 2 really benefits from the advantages of having a coherent object model and optional type safety. Typescript never gets in the way.
More information on Angular 2 is available at angular.io and the Angular GitHub repository.