AngularJS FlashCards app with IndexedDb