Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Getting Started with Angular - Second edition
  • Toc
  • feedback
Getting Started with Angular - Second edition

Getting Started with Angular - Second edition

By : Minko Gechev
close
Getting Started with Angular - Second edition

Getting Started with Angular - Second edition

By: Minko Gechev

Overview of this book

Want to build quick and robust web applications with Angular? This book is the quickest way to get to grips with Angular and take advantage of all its new features.
Table of Contents (9 chapters)
close

Using TypeScript


Let's start writing some TypeScript!

In the following sections, we will take a look at different snippets showing some of the features of TypeScript. In order to be able to run the snippets and play with them yourself, you'll need to install the TypeScript compiler on your computer. Let's take a look at how to do this.

TypeScript is best installed using Node Package Manager (npm). I'd recommend that you use npm's version 3.0.0 or newer. If you don't have node.js and npm installed already, you can visit https://nodejs.org and follow the instructions there.

Installing TypeScript with npm

Once you have npm installed and running, verify that you have the latest version by opening your terminal window and running the following command:

$ npm -v

Use the following command in order to install TypeScript 2.1.0 or newer:

$ npm install -g typescript@^2.1.0

The preceding command will install the TypeScript compiler and add its executable (tsc) as global.

In order to verify that...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete