O'Reilly logo

Angular 2 Cookbook by Matt Frisbie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring TypeScript for a minimum viable Angular 2 application

In order to use TypeScript alongside Angular 2, there are two major considerations: module interoperability and compilation. You'll need to handle both in order to take your application's .ts files, mix them with external library files, and output the files that would be compatible with your target device.

TypeScript comes ready as an npm package, but you will need to tell it how to interact with the files and modules you've written, and with files from other packages that you want to use in your modules.

Note

The code, links, and a live example of this are available at http://ngcookbook.herokuapp.com/1053/.

Getting ready

You should first complete the instructions mentioned in the preceding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required