demo/www/lib/angular-ui-router/src/state.js
function(state) {
      var url = state.url, config = { params: state.params || {} };

      if (isString(url)) {
        if (url.charAt(0) == '^') return $urlMatcherFactory.compile(url.substring(1), config);
        return (state.parent.navigable || root).url.concat(url, config);
      }

      if (!url || $urlMatcherFactory.isMatcher(url)) return url;
      throw new Error("Invalid url '" + url + "' in state '" + state + "'");
    }
function(state) {
      var url = state.url, config = { params: state.params || {} };

      if (isString(url)) {
        if (url.charAt(0) == '^') return $urlMatcherFactory.compile(url.substring(1), config);
        return (state.parent.navigable || root).url.concat(url, config);
      }

      if (!url || $urlMatcherFactory.isMatcher(url)) return url;
      throw new Error("Invalid url '" + url + "' in state '" + state + "'");
    }
function ( state ) { var url = state . url , config = { params : state . params || { } } ; if ( isString ( url ) ) { if ( url . charAt ( 0 ) == '^' ) return $urlMatcherFactory . compile ( url . substring ( 1 ) , config ) ; return ( state . parent . navigable || root ) . url . concat ( url , config ) ; } if ( ! url || $urlMatcherFactory . isMatcher ( url ) ) return url ; throw new Error ( "Invalid url '" + url + "' in state '" + state + "'" ) ; }
Build a URLMatcher if necessary, either via a relative or absolute URL
Build a URLMatcher if necessary either via a relative or absolute URL