Discussion

SSR with Angular Universal

Angular Universal is a Pre-Rendering solution for Angular.

Why Angular Universal?

  1. Facilitate web crawlers through search engine optimization (SEO)
  2. Improve performance on mobile and low-powered devices
  3. Show the first page quickly with a first-contentful paint (FCP)

Add Universal rendering with the Angular CLI

ng generate universal --client-project <name of your client project>

Build the Angular Universal Bundle

ng run your-project-name:server

Start Universal App

npm run build:ssr && npm run serve:ssr

Creating server-side app module

ng add @nguniversal/express-engine --clientProject <name of your project>

npm run dev:ssr

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *