title: pushState method doesnt work
body: <p>Hello I'm trying to change URL without reloading a page, using a <code>window.history.pushState</code> method, but it's not working as I want. For example I have an address: <code>localhost:1234/jobs</code> and I would like change this to <code>localhost:1234/jobs?jobId=1#update</code>, so I tried do this by my own method:</p>
  
  <pre><code>changeAddress(jobId){    
      window.history.pushState(null, "Job update", "/jobs?jobId=" + jobId + "#update");
  };
  </code></pre>
  
  <p>But it's not working, this method is making good address only for one second and it backs to old value. 
  I made a method which should activate after url change -  </p>
  
  <pre><code>$(window).on('popstate', function(){
      console.log(window.location.href);            
  });
  </code></pre>
  
  <p>But nothing happened. What am I doing wrong?</p>
  
  <p>Ok, so maybe after example from my code everything will be more clearly. 
  I have an element in .jsp file: </p>
  
  <pre><code>&lt;i class="fas fa-edit fa-fw"
                         data-tooltip="tooltip"
                         title="Edit this job"
                         ng-click="goJobModal(job.id);$event.stopPropagation()"&gt;&lt;/i&gt;
  </code></pre>
  
  <p>After pressing this button, method goJobModal should execute:</p>
  
  <pre><code>$scope.goJobModal = function (jobId) {
        if(jobId){
            window.history.pushState=(null, "Updating job, "/jobs?jobId=" + jobId + "#update");          
        } else {
            window.history.pushState(null, "Creating job", "/jobs#create");              
        }
      };
  </code></pre>
  
  <p>This method is only changing url using a <code>window.history.pushState</code>, then popstate event should be triggered: </p>
  
  <pre><code>$(window).on('popstate', function(){
      console.log(window.location.href);
      $scope.makeActionWithHashParam();
  });
  </code></pre>
  
  <p>But it's not. </p>