code: function LocationUrl(url, pathPrefix, appBaseUrl) {
    pathPrefix = pathPrefix || '';
  
    /**
     * Parse given html5 (regular) url string into properties
     * @param {string} newAbsoluteUrl HTML5 url
     * @private
     */
    this.$$parse = function(newAbsoluteUrl) {
      var match = matchUrl(newAbsoluteUrl, this);
  
      if (match.path.indexOf(pathPrefix) !== 0) {
        throw Error('Invalid url "' + newAbsoluteUrl + '", missing path prefix "' + pathPrefix + '" !');
      }
  
      this.$$path = decodeURIComponent(match.path.substr(pathPrefix.length));
      this.$$search = parseKeyValue(match.search);
      this.$$hash = match.hash && decodeURIComponent(match.hash) || '';
  
      this.$$compose();
    };
  
    /**
     * Compose url and update `absUrl` property
     * @private
     */
    this.$$compose = function() {
      var search = toKeyValue(this.$$search),
          hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
  
      this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
      this.$$absUrl = composeProtocolHostPort(this.$$protocol, this.$$host, this.$$port) +
                      pathPrefix + this.$$url;
    };
  
  
    this.$$rewriteAppUrl = function(absoluteLinkUrl) {
      if(absoluteLinkUrl.indexOf(appBaseUrl) == 0) {
        return absoluteLinkUrl;
      }
    }
  
  
    this.$$parse(url);
  }
docs: LocationUrl represents an url
  This object is exposed as $location service when HTML5 mode is enabled and supported
  
  @constructor
  @param {string} url HTML5 url
  @param {string} pathPrefix