Modifying the theme color for your PWA
In the previous recipe, we learned how to convert an Angular app into a PWA. And when we do so, the @angular/pwa
package creates the web app manifest file with a default theme color, as shown in Figure 13.9. However, almost every web app has its own branding and style. And if you want to theme your PWA's title bar according to your branding, this is the recipe for you. We'll learn how to modify the web app manifest file to customize the PWA's theme color.
Getting ready
The project for this recipe resides in chapter13/start_here/pwa-custom-theme-color
:
- Open the project in Visual Studio Code.
- Open the terminal and run
npm install
to install the dependencies of the project. - Once done, run
ng build --configuration production
. - Now run
http-server dist/pwa-custom-theme-color -p 5300
to serve it. - Open
localhost:5300
to view the application. - Finally, install the PWA as shown in Figure 13.8.
If you open...