title: The $rootScope.$on() method for angular is not being triggered when I call it. Why?
body: <p>I'm trying to make a simple with login features using Angularjs. I've seperated the controllers and made a service that autheticates the user with a Firebase server. Another thing I should mention is that I'm using their API called Angular Fire.The problem is that I'm trying to trigger a $rootScope.$on function. Here's the code: </p>
  
  <pre><code>myApp.controller('StatusController', function($scope, $rootScope, $firebase, $firebaseAuth) {
  
      console.log($rootScope);
  
      $rootScope.$on('$firebaseAuth:authWithPassword', function(e, authUser){
          console.log("printsomething");
          $scope.userEmail = authUser.userEmail;
      }); //$firebaseAuth:login
  });//StatusController
  </code></pre>
  
  <p>And here is authentication service:</p>
  
  <pre><code>myApp.factory('Authentication', function ($firebase, $firebaseAuth, FIREBASE_URL, $location) {
  
      var ref = new Firebase(FIREBASE_URL);
      console.log(FIREBASE_URL);
      var simpleLogin = $firebaseAuth(ref);
  
      var myObject = {
          login: function (user) {
              return **simpleLogin.$authWithPassword**({
                  email: user.email,
                  password: user.password
              });
          } //login
      } //myObject
      return myObject;
  })
  </code></pre>
  
  <p>Here is the where the Authentication is being called. In my registration controller:</p>
  
  <pre><code>myApp.controller('RegistrationController', function($scope, $firebaseAuth, $location, Authentication) {
  
  
  $scope.login = function() {
      Authentication.login($scope.user)
      .then(function(user) {
          $location.path('/meetings');
      }, function(error) {
          $scope.message = error.toString();
      });
  }//login
  $scope.register = function() {
      $location.path('/register');
  }//register
  });//
  </code></pre>
  
  <p>I even logged the root scope to see if I had the right parameter inside the $on() function:</p>
  
  <pre><code>$$listeners: Object$firebaseAuth:authWithPassword: Array[1]0: function (e, authUser){length: 1
  __proto__: Array[0]
  </code></pre>
  
  <p>Please if anyone can help I would appreciate it.</p>