code: function urlsEqual(a, b) {
        return a === b || urlResolve(a).href === urlResolve(b).href;
      }
docs: 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