Getting started with Angular universal
There are many blogs that offers tutorial on angular universal. However, most of it has some issues. You can clone entire sample from here . Build and run instruction are given as well. To get it working from scratch, my app is called webapp ng new webapp --routing cd webapp ng g universal --client-project webapp # New Render Engine npm install @nguniversal/express-engine # If using lazy loading npm install @nguniversal/module-map-ngfactory-loader npm install --save-dev express webpack ts-loader # If using Firebase npm install --save-dev ws xmlhttprequest src/app/app.module.ts import { BrowserModule , BrowserTransferStateModule } from '@angular/platform-browser' ; import { NgModule } from '@angular/core' ; import { AppRoutingModule } from './app-routing.module' ; import { AppComponent } from './app.component' ; @ NgModule ({ declarations: [ AppComponent ], imports: [ Br...