code: 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 + "'");
      }
docs: Build a URLMatcher if necessary, either via a relative or absolute URL