title: Redirect using AngularJS
body: <p>I'm trying to redirect to another route using:</p>
  
  <pre><code>$location.path("/route");
  </code></pre>
  
  <p>But for some reason it is not working. I did an auto-complete widget using jQuery-UI and I'm calling a function from the scope once the user selects an option. I debugged it and it enters the function but it is never redirected to the other route. It only changes the route when I press a key.</p>
  
  <p>I think it is kind of strange but I haven't figured out how to solve this. I used</p>
  
  <pre><code>window.location = "#/route";
  </code></pre>
  
  <p>and it works but I want to use the <code>path()</code> function.</p>
  
  <p>Does anybody have any idea why this is happening?</p>