I have a code snippet 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 is functional, but requires a page reload to reflect the changes. I am looking for a way to update it instantly.
While troubleshooting, I included the following code segment, however, it never seems to trigger... Any insights on what might be going wrong?
$scope.users.$on('set', opts, function(value) {
console.log(value);
});