It makes sense to use $rootScope
in your application. Like you mentioned, $scope.$root
is simply a reference to $rootScope
from your current $scope
. If you're going to be referencing the root scope, you should inject and use $rootScope
since it is an explicit declaration of the top-level $scope
.
However, in general, AngularJS best practices usually lead the developer to stray away from using $rootScope
. Although it is convenient to have a global scope that can be injected anywhere in your application, it is typically overused and abused causing too many objects to be on the $rootScope
objects which can lead to slower performance in larger AngularJS applications.
Typically when I'm thinking about using $rootScope
to globally hold something, I stop and think for a minute as to what a better approach might be. Perhaps a better solution could involve injecting a shared service/factory around instead of relying on the $rootScope
.