Determine if two URLs are equal despite potentially having different encoding/normalizing such as $location.absUrl() vs $browser.url() See https://github.com/angular/angular.js/issues/16592
function urlsEqual(a, b) {
      return a === b || urlResolve(a).href === urlResolve(b).href;
    }