$rootScope value undefined

I'm defining a rootScope variable after making a login in my application, the strange thing is that the value is declared in parts undefined.

 $rootScope.username = data.nombre;
 $rootScope.userImage = data.photo;

These variables are declared and contain a value because I have checked, for example. This variable is defined in LoginController, then I use in HomeCtrl and this works quite well. But to use it in the declaration of a menu fails and is not recognized.

EDIT

In this state I need to pass the value of the variable and which can not not even a service (not that does not work is that I can not think the way) I thought that $ rootScope would work. This state has no controller according defini I needed guidance on how to run a driver for it so to pass the variables that need to be displayed.

.state('eventmenu', {
  url: "/event",
  abstract: true,
  templateUrl: "event-menu.html"
})

Some more code would have been helpful, especially the controller where you are using $rootScope. With the given data i can point to a common pitfall: not properly injecting $rootScope in the controller. $rootScope being a service needs to be injected in the controller. Example:

module.controller('MyController', ['$scope', '$rootScope',function($scope, $rootScope) {
  ...
}]);