code: function getUrlForRouter(urlStr) {
          urlStr = urlStr || location.href;
          var uri = url.parse(urlStr);
          if (!globalConfig.useHash && supportHistoryPushState) {
              return uri.pathname.substr(globalConfig.urlRoot.length) + (uri.search || '');
          } else {
              return utils.getHash(urlStr);
          }
      }
docs: get url path for router dispatch get url path for router dispatch