Angular 2 and TypeScript, Comparing Angular 1.x and 2.0

2015-03-06 00:00:00 +0000 by Alex R. Young

Angular 2 is Built on TypeScript

There's a post on the msdn blog that says Angular 2.0 is built with TypeScript. This is a big step, but there is a precedent for it -- an earlier Angular blog post mentioned the AtScript project that resulted in a collaboration between Microsoft and the Angular team.

This partnership has been very productive and rewarding experience for us, and as part of this collaboration, we're happy to announce that Angular 2 will now be built with TypeScript. We're looking forward to seeing what people will be able to do with these new tools and continuing to work with the Angular team to improve the experience for Angular developers.

Now AtScript development has been abandoned in favour of TypeScript, what does this mean for Angular developers? There's a TodoMVC TypeScript Angular 2.0 example project on GitHub, which uses JavaScript for the main code. To use it, you'll need to download the new Angular 2.0 code separately.

Hopefully this shift will result in a more future-proof Angular, but it's hard to tell if switching to TypeScript now is a good idea, given the interest in ES6 and ES7.

Comparing Angular 1.x and 2.0

In case you're excited/worried/apathetic about the previous news, Shawn McKay sent in a post that compares angular 2.0 with 1.x:

Angular 2.0 looks fantastic. It's not ready yet, but you can play around with it today. Checkout the GitHub for more. There are also some examples available, such as ng2do.

The post explains how to set up Angular 2.0 and outlines the major new features. If you're also working with React, then you might want to read more about the new DOM handling:

"2.0: In many ways, Angular 2.0 seems to handle DOM style manipulation with something similar to React.js's virtual DOM, which they referred to in a recent presentation as the "view". In response to a recent question about 'Angular Native?', Misko mentioned that this View could be run on a web worker or even potentially on native."