title: angularJs redirect using both $window and $location
body: <p>I try to save some value in a rootscope variable and then I want to be redirected to an other page in which I show the rootscope value .. but when I use $window.location.url='path_to_new_page'I lose all rootscope variables .. I try to do this whit $location.path('path_to_new_page') but this time I m not redirected I stay in the same page and the url doesn't change ?!</p>
  
  <p>The same code work very fine in an other pc but in my pc (which I just formatted ) doesn't work .. I ve installed node js globally and also bower.</p>
  
  <p><strong>Edit</strong> 
  Here an example of a function in my project</p>
  
  <pre><code> $scope.showDetails=function(id){
          $scope.essayeREST=new RestApi('showdetails');
          $scope.essayeREST.get(id).then(function(result){
              $rootScope.user=result;
  
              $rootScope.firstName= $rootScope.user.firstname
              $rootScope.lastName= $rootScope.user.lastname;
              $rootScope.cn= $rootScope.attestation.user.cn;
  
             $window.location.url='/myApp/#/app/user_profile'
           //$location.path('/myApp/#/app/user_profile');
  
          });
  </code></pre>
  
  <p>Can someone help me to resolve this problem please?</p>