Introducing the Angular router
In traditional web applications, when we wanted to change from one view to another, we needed to request a new page from the server. The browser would create a URL for the view and send it to the server. The browser would then reload the page as soon as the server received a response. It was a process that resulted in round trip time delays and a bad user experience for our applications:
Modern web applications using JavaScript frameworks such as Angular follow a different approach. They handle changes between views or components on the client side without bothering the server. They contact the server only once during bootstrapping to get the main HTML file. Any subsequent URL changes are intercepted and handled by the router on the client. These types of applications are called Single-Page Applications (SPA) because they do not cause a full reload of a...