npm install
oryarn
This repo demonstrates the use of 2 different forms of Server Side Rendering.
Static Also known as prerendering - This happens at build time; it renders your application and replaces the dist index.html with a rendered version.
Dynamic - This happens at runtime; you use Server Side Engine such as the ngExpressEngine
to render your application as requests come in.
- run
npm run start
which will startng serve
npm run build:static
ornpm run build:dynamic
to compile your application for distribution
This demo is built following this guide: https://github.com/angular/angular-cli/wiki/stories-universal-rendering Along with https://github.com/angular/universal/tree/master/modules/ng-module-map-ngfactory-loader to enable Lazy Loading