/angular-tour-of-heroes

Angular Tour of Heroes Tutorial with AOT and Angular Universal

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Angular Tutorial: Tour of Heroes with Ahead-Of-Time and Universal support

This repo follows this offcail instruction on angular.io. It adds support of Ahead-Of-Time and Universal to improve the speed.

Forked from johnpapa's repo as I do not want to redo the tour-of-heroes tutorial.

Getting Started

Get the Code

git clone https://github.com/Mjf94/angular-tour-of-heroes.git toh
cd toh
npm i # or: yarn install

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 build:aot 
# when finish, run
npm run serve:aot

Angular Universal

Runs in Angular Universal mode

npm run build:uni 
# when finish, run
npm run serve:uni