{"action":"created","issue":{"url":"https://api.github.com/repos/Urigo/angular-meteor/issues/415","labels_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/415/labels{/name}","comments_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/415/comments","events_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/415/events","html_url":"https://github.com/Urigo/angular-meteor/issues/415","id":85819085,"number":415,"title":"is it possible to use getReactively on $rootScope variables?","user":{"login":"oshai","id":2683969,"avatar_url":"https://avatars.githubusercontent.com/u/2683969?v=3","gravatar_id":"","url":"https://api.github.com/users/oshai","html_url":"https://github.com/oshai","followers_url":"https://api.github.com/users/oshai/followers","following_url":"https://api.github.com/users/oshai/following{/other_user}","gists_url":"https://api.github.com/users/oshai/gists{/gist_id}","starred_url":"https://api.github.com/users/oshai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshai/subscriptions","organizations_url":"https://api.github.com/users/oshai/orgs","repos_url":"https://api.github.com/users/oshai/repos","events_url":"https://api.github.com/users/oshai/events{/privacy}","received_events_url":"https://api.github.com/users/oshai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-06T22:52:03Z","updated_at":"2015-06-07T19:52:40Z","closed_at":null,"body":"I have a case that I want to update the ui based on the user so if a user was log-out and log-in ass different user, a score of the user in the ui is changed. The way I thought about doing it is by looking at `$rootScope.currentUser`.  \r\n\r\nfrom my testing it seems like there is some kind of access to the $rootScope, but it is not getting updated on user change (unless I have a bug in my code). here is the relevant code:\r\n\r\n    $meteor.autorun($scope, function() {\r\n                if (null !== $rootScope.currentUser) {\r\n                    $scope.userForScore = $scope.$meteorObject(Userinfo, {user_id: $scope.getReactively('currentUser')._id});//$rootScope.currentUser._id\r\n                }\r\n            });\r\n\r\n        $scope.userScore = function(){\r\n            if ($scope.userForScore === undefined || $scope.userForScore.score === undefined) {\r\n                return 1;\r\n            }\r\n            return $scope.userForScore.score;\r\n        };\r\n\r\nUserinfo - is a collection I created in the server."},"comment":{"url":"https://api.github.com/repos/Urigo/angular-meteor/issues/comments/109793206","html_url":"https://github.com/Urigo/angular-meteor/issues/415#issuecomment-109793206","issue_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/415","id":109793206,"user":{"login":"oshai","id":2683969,"avatar_url":"https://avatars.githubusercontent.com/u/2683969?v=3","gravatar_id":"","url":"https://api.github.com/users/oshai","html_url":"https://github.com/oshai","followers_url":"https://api.github.com/users/oshai/followers","following_url":"https://api.github.com/users/oshai/following{/other_user}","gists_url":"https://api.github.com/users/oshai/gists{/gist_id}","starred_url":"https://api.github.com/users/oshai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oshai/subscriptions","organizations_url":"https://api.github.com/users/oshai/orgs","repos_url":"https://api.github.com/users/oshai/repos","events_url":"https://api.github.com/users/oshai/events{/privacy}","received_events_url":"https://api.github.com/users/oshai/received_events","type":"User","site_admin":false},"created_at":"2015-06-07T19:52:40Z","updated_at":"2015-06-07T19:52:40Z","body":"It is working, thanks!\r\nIs it a bug? should it be documented somewhere?\r\nthe documentation <a href=\"http://angular-meteor.com/api/auth\">here</a> says:\r\n`$rootScope.currentUser — The current logged in user and it's data. it is null if the user is not logged in. A reactive data source.`"}}