So you want your Angular app to work offline? Great, just build a Progressive Web App (PWA)! That’s easily said, but hardly the full story. What if you have an existing online app to which you want to add offline capabilities? Or perhaps you are designing a new app that will work mostly online, but needs one or two screens to work offline as well?
How do you add offline capabilities to a web application? If you search for an answer to these questions, the answer that will invariably pop up is to turn your application into a Progressive Web App (PWA). It is easy to find tutorials that cover the basics. But then the difficult questions arise: what architectural pattern do I use to fetch, store and cache my app’s data? How do I synchronize local changes to the data back to the server? How can I test all this?