|Angular Partners With TypeScript|
|Written by Alex Armstrong|
|Tuesday, 10 March 2015|
Google's Angular team revealed at ng-conf that it has been working closely with Microsoft's TypeScript team to bring new features to Angular 2.0.
Google's AngularJS is one of the most popular UI frameworks and hence in use in many projects. When Angular 2.0 was announced last Fall (see AngularJS 2.0 Is Radically Different) its develop community was dismayed to discover that it would not be backward compatible and so would leave existing projects using AngularJS 1.3 dead in the water.
At that time its team issued a blog post that tried to soften the blow and also provide a glimmer of hope saying:
"Our goal with Angular 2 is to make the best possible set of tools for building web apps not constrained by maintaining backwards compatibility with existing APIs. Once we have an initial version of Angular 2, we'll start to work on a migration path for Angular 1 apps."
Back in 2014 it was stated that Angular 2 will introduce AtScript, an extension of the TypeScript optional typing. Now it transpires that Angular 2 is being built with Typescript.
On the Typescript blog, Jonathan Turner explains how this will enhance Anglular 2:
We have worked with the Angular team to design a set of new features that will help you develop cleaner code when working with dynamic libraries like Angular 2, including a new way to annotate class declarations with metadata. Library and application developers can use these metadata annotations to cleanly separate code from information about the code, such as configuration information or conditional compilation checks.
We've also added a way to retrieve type information at runtime. When enabled, this will enable developers to do a simple type introspection. To verify code correctness with additional runtime checks. It also enables libraries like Angular to use type information to set up dependency injection based on the types themselves.
A demo created for ng-conf as a preview of Angluar 2 is a TODOMVC example that can be tried out on GitHub. Here it shows TypeScript autocomplete in Sublime 3:
Although it may seem strange to find Microsoft and Google in such close co-operation, perhaps it exemplifies the commitment of both to open source. On his blog Micrcrosoft's S.Somesegar writes:
Of course being used on a big project like Angular 2 makes TypeScript seem all the more like a real language.
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Thursday, 26 March 2015 )|