replace GlobalController with $rootScope.