js/libs/ember-1.5.1.js
function doTransition(router, args, isIntermediate) {
      // Normalize blank transitions to root URL transitions.
      var name = args[0] || '/';

      var lastArg = args[args.length-1];
      var queryParams = {};
      if (lastArg && lastArg.hasOwnProperty('queryParams')) {
        queryParams = pop.call(args).queryParams;
      }

      var intent;
      if (args.length === 0) {

        log(router, "Updating query params");

        // A query param update is really just a transition
        // into the route you're already on.
        var handlerInfos = router.state.handlerInfos;
        intent = new NamedTransitionIntent({
          name: handlerInfos[handlerInfos.length - 1].name,
          contexts: [],
          queryParams: queryParams
        });

      } else if (name.charAt(0) === '/') {

        log(router, "Attempting URL transition to " + name);
        intent = new URLTransitionIntent({ url: name });

      } else {

        log(router, "Attempting transition to " + name);
        intent = new NamedTransitionIntent({
          name: args[0],
          contexts: slice.call(args, 1),
          queryParams: queryParams
        });
      }

      return router.transitionByIntent(intent, isIntermediate);
    }
function doTransition(router, args, isIntermediate) {
      // Normalize blank transitions to root URL transitions.
      var name = args[0] || '/';

      var lastArg = args[args.length-1];
      var queryParams = {};
      if (lastArg && lastArg.hasOwnProperty('queryParams')) {
        queryParams = pop.call(args).queryParams;
      }

      var intent;
      if (args.length === 0) {

        log(router, "Updating query params");

        // A query param update is really just a transition
        // into the route you're already on.
        var handlerInfos = router.state.handlerInfos;
        intent = new NamedTransitionIntent({
          name: handlerInfos[handlerInfos.length - 1].name,
          contexts: [],
          queryParams: queryParams
        });

      } else if (name.charAt(0) === '/') {

        log(router, "Attempting URL transition to " + name);
        intent = new URLTransitionIntent({ url: name });

      } else {

        log(router, "Attempting transition to " + name);
        intent = new NamedTransitionIntent({
          name: args[0],
          contexts: slice.call(args, 1),
          queryParams: queryParams
        });
      }

      return router.transitionByIntent(intent, isIntermediate);
    }
function doTransition ( router , args , isIntermediate ) { // Normalize blank transitions to root URL transitions. var name = args [ 0 ] || '/' ; var lastArg = args [ args . length - 1 ] ; var queryParams = { } ; if ( lastArg && lastArg . hasOwnProperty ( 'queryParams' ) ) { queryParams = pop . call ( args ) . queryParams ; } var intent ; if ( args . length === 0 ) { log ( router , "Updating query params" ) ; // A query param update is really just a transition // into the route you're already on. var handlerInfos = router . state . handlerInfos ; intent = new NamedTransitionIntent ( { name : handlerInfos [ handlerInfos . length - 1 ] . name , contexts : [ ] , queryParams : queryParams } ) ; } else if ( name . charAt ( 0 ) === '/' ) { log ( router , "Attempting URL transition to " + name ) ; intent = new URLTransitionIntent ( { url : name } ) ; } else { log ( router , "Attempting transition to " + name ) ; intent = new NamedTransitionIntent ( { name : args [ 0 ] , contexts : slice . call ( args , 1 ) , queryParams : queryParams } ) ; } return router . transitionByIntent ( intent , isIntermediate ) ; }
@private

Begins and returns a Transition based on the provided
arguments. Accepts arguments in the form of both URL
transitions and named transitions.

@param {Router} router
@param {Array[Object]} args arguments passed to transitionTo,
replaceWith, or handleURL
@private