Angular 2 - Tour of Heroes - The Next Step after Getting Started
TypeScript HTML CSS JavaScript
Latest commit 3c237dc Jan 16, 2017 @johnpapa committed on GitHub Feature/2.4 (#109)
* tweaks

* ngfor features

* removed reflect metadat

Getting Started

Super simple Angular 2 app with 1 module and 2 routes

Get the Code

git clone toh
cd toh
npm i

Just in Time (JiT) Compilation

Runs the TypeScript compiler and launches the app

npm start

Ahead of Time (AoT) Compilation

Runs the Angular AoT compiler, rollup, uglify for an optimized bundle, then launches the app

npm run start-aot

AoT + gzip

Runs AoT plus gzips and launches the app

gulp copy-aot-gzip
npm run aot
npm run rollup


  • Use your favorite server in place of http-server
  • This could be scripted, obviously
  • lite-server does not launch gzipped files by default.