db.js

IndexedDB callback not updating UI in angularjs

拈花ヽ惹草 提交于 2020-01-14 02:44:11
问题 I am using the following library to access IndexedDB in Angularjs on a new Chrome App: https://github.com/aaronpowell/db.js When I try to update the UI on App startup by using this : db.orders.query().all().execute().done(function(results) { $scope.ordercount = results.length; }); in my main.html I have used the ordercount variable as: Orders : {{ordercount}} However, the UI is not updating unless I do ng-click or any other ng-* events. All I need is to show number of orders when my app is

IndexedDB callback not updating UI in angularjs

纵然是瞬间 提交于 2019-12-06 13:31:57
I am using the following library to access IndexedDB in Angularjs on a new Chrome App: https://github.com/aaronpowell/db.js When I try to update the UI on App startup by using this : db.orders.query().all().execute().done(function(results) { $scope.ordercount = results.length; }); in my main.html I have used the ordercount variable as: Orders : {{ordercount}} However, the UI is not updating unless I do ng-click or any other ng-* events. All I need is to show number of orders when my app is loaded. I tried $scope.apply(), but it throws error saying apply() is not available. Please help. Since