Client-side rendering (CSR) generates the interface in the browser. An Angular application is bundled into JavaScript, HTML, and CSS, then served through an index.html entry point. section 9.4.4
Deploying a CSR Angular application typically requires:
- Build the application into a dist folder containing the deployable bundle. section 9.4.4
- Copy the generated application folder to hosting that serves its files. section 9.4.4
- Configure the server to return index.html for unknown routes, allowing Angular to handle client-side routing instead of producing a 404. section 9.4.4
HRMS application deployment
An Angular HRMS application can be built into an hrms folder and deployed as static files. A direct request to /products first receives index.html; after JavaScript loads, Angular determines the route and displays the page. section 9.4.4
ng build
Use the build command to generate the deployable CSR bundle. section 9.4.4
Figure 9.6 Server + Angular handling a direct request to a particular route
Trace how the server and Angular cooperate when a user directly navigates to a client-side route. section 9.4.4
