Added $state to $rootScope