benchmarks/scenarios/ember.js
function (handlerName) {

      var partitionedArgs = _routerUtils.extractQueryParams(_routerUtils.slice.call(arguments, 1)),
          suppliedParams = partitionedArgs[0],
          queryParams = partitionedArgs[1];

      // Construct a TransitionIntent with the provided params
      // and apply it to the present state of the router.
      var intent = new _routerTransitionIntentNamedTransitionIntent.default({ name: handlerName, contexts: suppliedParams });
      var state = intent.applyToState(this.state, this.recognizer, this.getHandler);
      var params = {};

      for (var i = 0, len = state.handlerInfos.length; i < len; ++i) {
        var handlerInfo = state.handlerInfos[i];
        var handlerParams = handlerInfo.serialize();
        _routerUtils.merge(params, handlerParams);
      }
      params.queryParams = queryParams;

      return this.recognizer.generate(handlerName, params);
    }
function (handlerName) {

      var partitionedArgs = _routerUtils.extractQueryParams(_routerUtils.slice.call(arguments, 1)),
          suppliedParams = partitionedArgs[0],
          queryParams = partitionedArgs[1];

      // Construct a TransitionIntent with the provided params
      // and apply it to the present state of the router.
      var intent = new _routerTransitionIntentNamedTransitionIntent.default({ name: handlerName, contexts: suppliedParams });
      var state = intent.applyToState(this.state, this.recognizer, this.getHandler);
      var params = {};

      for (var i = 0, len = state.handlerInfos.length; i < len; ++i) {
        var handlerInfo = state.handlerInfos[i];
        var handlerParams = handlerInfo.serialize();
        _routerUtils.merge(params, handlerParams);
      }
      params.queryParams = queryParams;

      return this.recognizer.generate(handlerName, params);
    }
function ( handlerName ) { var partitionedArgs = _routerUtils . extractQueryParams ( _routerUtils . slice . call ( arguments , 1 ) ) , suppliedParams = partitionedArgs [ 0 ] , queryParams = partitionedArgs [ 1 ] ; // Construct a TransitionIntent with the provided params // and apply it to the present state of the router. var intent = new _routerTransitionIntentNamedTransitionIntent . default ( { name : handlerName , contexts : suppliedParams } ) ; var state = intent . applyToState ( this . state , this . recognizer , this . getHandler ) ; var params = { } ; for ( var i = 0 , len = state . handlerInfos . length ; i < len ; ++ i ) { var handlerInfo = state . handlerInfos [ i ] ; var handlerParams = handlerInfo . serialize ( ) ; _routerUtils . merge ( params , handlerParams ) ; } params . queryParams = queryParams ; return this . recognizer . generate ( handlerName , params ) ; }
Take a named route and context objects and generate a
URL.
@param {String} name the name of the route to generate
a URL for
@param {...Object} objects a list of objects to serialize
@return {String} a URL
Take a named route and context objects and generate a URL .