indexeddb implementation, #15

This commit is contained in:
Mo Bitar
2017-01-11 17:50:47 -06:00
parent 7459df9b5a
commit 3ffc9ee667
9 changed files with 600 additions and 281 deletions

View File

@@ -2,18 +2,21 @@ angular.module('app.frontend')
.controller('HomeCtrl', function ($scope, $rootScope, $timeout, apiController, modelManager) {
$rootScope.bodyClass = "app-body-class";
apiController.loadLocalItems();
apiController.loadLocalItems(function(items){
$scope.$apply();
apiController.sync(null);
// refresh every 30s
setInterval(function () {
apiController.sync(null);
}, 30000);
});
$scope.allTag = new Tag({all: true});
$scope.allTag.title = "All";
$scope.tags = modelManager.tags;
$scope.allTag.notes = modelManager.notes;
apiController.sync(null);
// refresh every 30s
setInterval(function () {
apiController.sync(null);
}, 30000);
/*
Tags Ctrl Callbacks
*/