WordPress is one of the best frameworks for building blogs, but since it's built using PHP and not JavaScript, it would be challenging to convert blogs into an SPA. WordPress has a great REST API that can be used in our Angular application to show blog posts.
In this chapter, we will be creating a personal blog using the WordPress REST API and using Angular Router to create and link to multiple pages. Initially, we will bundle the whole application in one JavaScript file and then move to lazy loading the JavaScript when required. We will use a pre-loading strategy for this, which will make our application faster on its initial load.
The following screenshot shows our Home page for the blog:
Now that we have had an overview of the project, let's get started with it.