A sample implementation of using IndexedDB in an AngularJS app