cd angular2
npm install
# JIT Compilation
npm run build:prod
cd dist && httpserver
# AOT Compilation
npm run build:aot:prod
cd dist && httpserver
cd angular4
npm install
# JIT Compilation
npm run build:prod
cd dist && httpserver
# AOT Compilation
npm run build:aot:prod
cd dist && httpserver
Go to: localhost:8000, open Chrome Dev Tools on the perfomance tab, and run the page several times to see the average download results
Usage AOT ng build --aot --prod
or JIT ng build --no-aot --prod --build-optimizer false
- In the version of Angular 2, the assembly drops, however, the files are successfully compiled, after which you can start the local web server (the problem was solved in Angular 4)
jsfiddle: http://jsfiddle.net/dhfag8w4/