angularjs Watching rootscope changes

后端 未结 2 1777
花落未央
花落未央 2021-01-03 17:54

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\', 
  [
         


        
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-03 18:26

    The syntax was $rootScope.$watch('currentUser') not $rootScope.$watch($rootScope.currentUser)

提交回复
热议问题