title: Prevent search changes from spamming history
body: <p>I'm using links like <code>#!/OrderList?id=123</code>, which shows the list of all orders and more details of the order 123. With <code>reloadOnSearch=false</code> and watching <code>$routeUpdate</code> it works fine, except for one thing: All such links get put into the browsers history, while I'd prefer to have <em>only one such link there.</em> For example, instead of</p>
  
  <pre><code>#!/OrderList?id=123
  #!/OrderList?id=124
  #!/OrderList?id=125
  #!/AnotherList?id=678
  #!/AnotherList?id=679
  </code></pre>
  
  <p>just the last member of each group, i.e.,</p>
  
  <pre><code>#!/OrderList?id=125
  #!/AnotherList?id=679
  </code></pre>
  
  <p>I'm aware of <code>$location.replace()</code>, but I can't see where to place it when the change happens via <em>following a link</em>. I tried to place it in <code>$scope.$on("$routeUpdate", ...)</code>, but it did nothing, probably because it's too late when the route has already changed.</p>
  
  <p>I'm not using neither <code>router-ui</code> nor the HTML5 mode (just plain <code>angular-route</code>).</p>
  
  <hr>
  
  <p>I'm afraid, I wasn't clear about me insisting on using <code>href</code> rather than a custom handler. I want the links to work with middle mouse click and bookmarks and everything. A combination of <code>ng-href</code> and <code>ng-click</code> might do what I want, but I've found a <a href="https://stackoverflow.com/a/39452369/581205">simple solution</a> working with plain links.</p>