title: How can I retrieve the previous URL in AngularJS
body: <p>I know I can get the current URL using <code>$location.search()</code> and <code>$location.path()</code> but I need a way to get previous one.  Can I use a global variable or something like that?</p>