How to Use the APP_INITIALIZER Token to Hook Into the Angular Bootstrap Process

I've been building applications using Angular as a framework of choice for more than a year and this post is not another React vs. Angular or the quirks of each framework. Honestly, I like Angular and every day I discover something new which makes development easier and makes me look like a guy who built something very complex in a matter of hours, which would've taken a long time to put the correct architecture in place if I had chosen a different framework. The first thing that I learned in Angular is the use of the APP_INITIALIZER token.

The documentation at angular.io says APP_INITIALIZER is "a function that will be executed when an application is initialized." It does not give any details on how to use this function and where to include it.