title: AngularJS - change $location silently - remove query string
body: <p>Is there any way to silently change the route in the url bar using angular?</p>
  
  <p>The user clicks a link for the email that goes to:</p>
  
  <pre><code>/verificationExecuted?verificationCode=xxxxxx
  </code></pre>
  
  <p>When the page loads I want to read the verificationCode and then clear it:</p>
  
  <pre><code> if($location.path() == '/verificationExecuted'){
       this.registrationCode = this.$location.search()["verificationCode"];
       this.$location.search("verificationCode", null); //Uncomment but make this silent!
  
       if(registrationCode != null) {
           ....
       }
       else $location.path("/404");      
   }
  </code></pre>
  
  <p>What happens when I clear it is the remaining part of the route ("/verificationExecuted") remains buts the route re-triggers so it comes around again with no verificationCode and goes straight to 404.</p>
  
  <p>I want to remove the code without doing anything else.</p>