Chapter 7: Building an SSR Application for a GitHub Portfolio Using Angular
A typical Angular application follows the Single-Page Application (SPA) approach, where each page is created in the DOM of the browser while the user interacts with the application. A web server hosts the application and is responsible for serving only the main page, usually called index.html
, at application startup.
Server-Side Rendering (SSR) is a technique that follows an entirely different approach for application rendering than SPA. It uses the server to prerender pages while they are requested at runtime from the user. Rendering content on the server dramatically enhances the performance of a web application and improves its Search Engine Optimization (SEO) capabilities. To perform SSR in an Angular application, we use a library called Angular Universal.
In this chapter, we will learn how to benefit from Angular Universal by building a portfolio application using the GitHub API. We will cover the...