AngularJS service to connect and work upon indexedDB