Server-side rendering (SSR) is the process of converting a JavaScript app to plain HTML at request-time, allowing search engine crawlers and linkbots to understand page content reliably.
- @angular/cli >= v6.0
- @angular/fire >= v5.0.0
Follow the steps from the Angular Universal Tutorial to add Universal to your project.
ng add @nguniversal/express-engine
This will create all the files you need and setup all the configurations for Universal rendering for your application.
Test your app locally by running npm run dev:ssr
.
Note: dev:ssr
is a command that was added to your package.json
by the ng add
command that will run the dev server
for your Angular with Universal.