nl_tokens: Changes the location of the current window . If to begins with # it only changes the document s hash . If passed more than 1 argument redirect will join them together with forward slashes . ### Example redirect ( # / other / route ) ; // equivilent to redirect ( # other route ) ;
pl_tokens: function ( ) { var to , args = _makeArray ( arguments ) , current_location = this . app . getLocation ( ) ; if ( args . length > 1 ) { args . unshift ( '/' ) ; to = this . join . apply ( this , args ) ; } else { to = args [ 0 ] ; } this . <mask> ( 'redirect' , { to : to } ) ; this . app . last_location = [ this . verb , this . path ] ; this . app . setLocation ( to ) ; if ( current_location == to ) { this . app . trigger ( 'location-changed' ) ; } }