I\'m trying to bind to rootscope so that I can set presence on a different server when the user logins. Here\'s my module.
angular.module(\'presence\',
[
Something needs to change $rootScope.currentUser
for you to be able to notice any changes in it. You have shared the code for that.
Also changes to $rootScope.currentUser
need to take place inside the angularJS loop (http://docs.angularjs.org/guide/concepts). If it is done externally you can call $digest (http://docs.angularjs.org/api/ng.$rootScope.Scope#$digest)
The syntax was $rootScope.$watch('currentUser')
not $rootScope.$watch($rootScope.currentUser)