Angular 5 universal with Transfer State using @angular/cli

npm install -g @angular/cli
ng new --skip-install universal-demo-v5
cd universal-demo-v5
code . # Open VSCode
npm install -S @angular/platform-server@^5 express 
npm install -D ts-loader@^3 webpack-node-externals npm-run-all
npm install
ng build -prod --build-optimizer --app 0
ng build --aot --app 1
npm run build

Éverton Roberto Auler

Written by

Developer/Entrepreneur

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade