docs: function(urlMatcher, params, options) {
          if (!urlMatcher.validates(params)) return null;
  
          var isHtml5 = $locationProvider.html5Mode();
          if (angular.isObject(isHtml5)) {
            isHtml5 = isHtml5.enabled;
          }
  
          isHtml5 = isHtml5 && $sniffer.history;
          
          var url = urlMatcher.format(params);
          options = options || {};
  
          if (!isHtml5 && url !== null) {
            url = "#" + $locationProvider.hashPrefix() + url;
          }
  
          // Handle special hash param, if needed
          if (url !== null && params && params['#']) {
            url += '#' + params['#'];
          }
  
          url = appendBasePath(url, isHtml5, options.absolute);
  
          if (!options.absolute || !url) {
            return url;
          }
  
          var slash = (!isHtml5 && url ? '/' : ''), port = $location.port();
          port = (port === 80 || port === 443 ? '' : ':' + port);
  
          return [$location.protocol(), '://', $location.host(), port, slash, url].join('');
        }