Demo button is added in home.html to load mock-data.
All of the data/login-service functions are asynchronous.
get...List function will pass a list of data in a callback
get function will pass an object with data and functions in a callback.
eg)
dataService.get('user', 'user1@gmail.com').then(function(obj) { //callback
console.log(obj.data); // obj.data has all data
obj.addUserTag(something); // This function will add a tag to obj.data.tags
obj.save(); // This function will save obj.data in disk
});
get...List
function will pass a list of data in a callbackget
function will pass an object with data and functions in a callback.