Two years later, Angular 2 is ready to face the world

Angular 2 is here

JAXenter Editorial Team

It’s been two years since Google announced plans for Angular 2 and now the full-platform successor to Angular 1 is finally here. Let’s find out why it was worth the wait and what’s coming next for Angular.

Angular 2.0.0 was launched on September 14, 2016, one day after the team launched the last release candidate. According to the official statement,  “Angular 1 first solved the problem of how to develop for an emerging web. Six years later, the challenges faced by today’s application developers, and the sophistication of the devices that applications must support, have both changed immensely.”

Although Google’s Jules Kremer says that Angular is now “ready for the world,” one Redditor disagrees. In a thread on Reddit, one Redditor asked whether he should choose Angular over React; JTenerife replied that Angular 2 is “not production ready” and that he would “wait for a couple of month to let at least the tooling and styling options mature.”

What to expect next from Angular 2

In the near future, the Angular team will release bug fixes and non-breaking features for APIs marked as stable, Angular Material 2, more features and languages for Angular Universal, more work on animations, more speed and payload size improvements, more guides and live examples specific to your use cases and WebWorkers will be moved out of experimental.

Plus, the RC labeling is gone! From now on, the Angular team will move to semantic versioning which will follow the MAJOR.MINOR.PATCH scheme as described by semver:

  1. the MAJOR version gets incremented when incompatible API changes are made to stable APIs,
  2. the MINOR version gets incremented when backwards-compatible functionality are added,
  3. the PATCH version gets incremented when backwards-compatible bug are fixed.

More to come.


Update September 13, 2016

That was fast! The Angular team unveiled release candidate 6 just two weeks ago, and today we have a new one. Rumor has it that RC7 may be the last release candidate, which means that we may be seeing the final release soon.

Release candidate 7 is shorter than the previous release candidate, but one will see there are almost 20 bug fixes and one breaking change (no features though!): all …Metadata classes have been removed, which means that one should use the corresponding decorator as constructor or for instanceof checks instead. For example:

  • Before: new ComponentMetadata(…)
  • After: new Component(…)

However, new Component(…) worked before as well.


Update September 1, 2016

Release candidate 6 brings more than 60 bug fixes and over a dozen features.

Breaking changes in RC.6

npm packages: code in ESM (ES6 Modules) format is currently published at the default location in the npm package with package.json‘s main entry pointing to an UMD bundle (primarily for node, and webpack 1 users). For those who are using SystemJS to load Angular, it is recommended to adjust the SystemJS configuration to point to the UMD bundles (present in the npm package).

As far as testing config is concerned, there’s a new order in which various zone specs are loaded; this change stems from the zone.js peer-dependency upgrade.

The core changes include the following: Type is now Type<T> , so you will have to use Type<any> instead of Type. APIs SanitizationService and DomSanitizationService have been renamed to Sanitizer and DomSanitizer and the support for @Component.directives and @Component.pipes has been removed. It is important to remember that all the components and pipes must be declared through an NgModule, which is is the basic compilation block passed into the Angular compiler via Compiler#compileModuleSync or #compileModuleAsync. Due to this change, the Angular team also removed the Compiler#compileComponentAsync and #compileComponentSync. Therefore, any code doing compilation should compile module instead using the APIs mentioned above. Plus, the ngUpgrade module was modified to always require (it was previously optional) an NgModule to be passed into the UpgradeAdapter’s constructor.

ComponentResolver was removed, soComponentFactoryResolver should be used instead.

If you use the following forms of providers, you should know they are no longer accepted:
new Provider(MyClass, toFactory: ...)

{provider: MyClass, toFactory: ...}

is accepted.

Here is the entire list of changes.


Update August 10, 2016

The Angular team has just released release candidate number 5, which contains lots of bug fixes and features. Among the breaking changes we have the following: ApplicationRef.waitForAsyncInitializers is deprecated, so AppInitStatus.donePromise /AppInitStatus.done is now used instead. ApplicationRef.registerBootstrapListener is also deprecated, so the team advises users to provide a multi provider for the new token APP_BOOTSTRAP_LISTENER instead. See here all the core breaking changes.

TestInjector is now called TestBed:


import {TestInjector, getTestInjector} from '@angular/core/testing';


import {TestBed, getTestBed} from '@angular/core/testing';

Plus, the following API has been removed since it was never intended to be public:

import {verifyNoBrowserErrors} from '@angular/platform-browser/testing_e2e';

Here is the entire list of changes.


Update June 24, 2016

The third release candidate was published just a week after the second one. This update contains roughly 30 changes — 19 big fixes and 11 features.

As far as the breaking changes are concerned, it’s worth mentioning that Parse5Adapter is no longer exported as public API, use serverBootstrap() Parse5Adapter is an implementation detail not a public API.

Here is the entire list of changes.


Update June 16, 2016

The Angular team has released a new update after approximately one month of silence. This new update brings us one step closer to the final release and gives us a flavor of everything that has happened during the last month: countless bug fixes, features and breaking changes.

For starters, the Angular team revealed that the Location#platformStrategy property was previously unintentionally exported as public. Although the likelihood of anyone depending on this property is really low, they made it clear that if any application requires access to the current location strategy, it should be accessed via DI instead by injecting the LocationStrategy token. Bundles are currently in the bundles/subdirectory within each package and Parse5Adapter is no longer exported as public API, use serverBootstrap(). Plus, HTML, style values, and URLs are now automatically sanitized. When binding a URL or style property that would get ignored, users should bind to a value explicitly marked as safe instead by injection the DOM sanitization service:

class MyComponent {
  constructor(sanitizer: DomSanitizationService) {
    this.safeStyleValue = sanitizer.bypassSecurityTrustStyle('rotate(90deg)');
    // then bind to `safeStyleValue` in your template.

Here is the entire list of changes.


Update May 11, 2016

The Angular 2 team has just announced that HTML, style values, and URLs are now automatically sanitized. According to the release, values which do not match are either escaped or ignored. Users who bind a URL or style property that would get ignored are advised to bind to a value explicitly marked as safe instead by injection the DOM sanitization service:

class MyComponent { constructor(sanitizer: DomSanitizationService) { // ONLY DO THIS FOR VALUES YOU KNOW TO BE SAFE! NEVER ALLOW USER DATA IN THIS! this.safeStyleValue = sanitizer.bypassSecurityTrustStyle('rotate(90deg)'); // then bind to `safeStyleValue` in your template. } }


Update May 6, 2016

The Angular 2 team has issued a security warning. According to the announcement, “contextual escaping is not yet implemented in Angular 2.” However, this issue will be fixed in the next release candidate. The team recommended that users make sure to correctly escape all values that go into the DOM.

Other problems that have been highlighted by the Angular 2 team are the lack of source maps for umd bundles and the fact that the Ruler service is not being reexported via @angular/platform-browser.

Nine bugs have been fixed so far in release candidate 1.


Update May 4, 2016

Martin Probst, a software engineer at Google in the AngularJS team, told JAXenter earlier this year that “the final release of Angular 2 will take place in 2016.” Although the big announcement is not upon us yet, Angular 2 team has ticked off a massive milestone yesterday: first release candidate was announced via Twitter.

Angular 2.0.0-rc.0

The biggest change in this first release candidate is the repackaging of Angular into individual packages one per each feature area. All of the packages are now provided under the @angular npm scope. In short, this changes how Angular is installed via npm and how users import the code.

There is a great emphasis on the router; 16 improvements have been made in this department, while testing received two boosters. The complete list of changes and bug fixes can be found here.

Angular 2.0 – Why? What? And how?

What’s so special about Angular 2.0? Is the migration to the new Angular release still going to be a nightmare? And why do we all have to learn TypeScript now? AngularJS author Manfred Steyer answered the most common questions of the Angular community.


Inline Feedbacks
View all comments