I've got a piece of code that looks like this:
$scope.renameUser = function(key,name) {
console.log('renameUser, key: ', key);
console.log('renameUser, name: ', name);
var userOne = $scope.users.$key(key);
userOne.$key('displayName').$set(name);
};
It works, but you need to reload the page to see the updated result. I would like it to update instantly.
During debugging I added this part, but I never get it to trigger... Any ideas what is going on?
$scope.users.$on('set', opts, function(value) {
console.log(value);
});