In web development, creating great offline experiences can be challenging. There are many things to consider, but today I would like to talk about a very specific scenario. Suppose you’re developing a web application that loads user generated text with custom Google Fonts. The fonts are loaded via CSS import rules like so...

@import url('https://fonts.googleapis.com/css?family=Barrio');

In order to run your application offline and get maximum browser coverage, you can use HTML5 Application Cache to cache static files (HTML, CSS, JavaScript, images, ect). You can also store user generated text in local storage. …


There are plenty of resources for testing Angular apps, but one thing I can’t seem to find is a good solution for testing $q promises without mocking the results.

Let’s say you have a service that does some asynchronous work and you would like to test the actual resolved values. Because the $q service is tied to Angular’s digest loop, you can’t simply write a test for it.

There have many articles written about testing $q promises, but I have yet to find a solution that works well and is simple to implement, so I made my own.

My solution…

Bogdan Pshonyak

I like to code, travel, work out, listen to good music, and enjoy the company of good friends。

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store