title: $location.path() from within a promise
body: <p>I am trying to change the location after a promise is returned, however, the location will not change.</p>
  
  <pre><code>function register() {
      firebase.auth().createUserWithEmailAndPassword($scope.email, $scope.password)
      .then(function (user) {
          console.log(user);
          UserService.setUser(user);
          $location.path('/home');
      })
      .catch(function (error) {
          $scope.message = error.message;
          alert($scope.message);
      });
  }
  </code></pre>
  
  <p>I'm assuming this is because it's within a promise's <code>.then</code> function, but I don't see documentation on $location that says it can't be used within a promise.</p>
  
  <p>The console shows the user that was created and there are no errors.</p>