src/bunny.route.js
function(uri) {
        if (this.defined(uri)) {
            history.pushState(null, null, uri);
            var event = new CustomEvent('onRouteChange');
            event.route = uri;
            document.dispatchEvent(event, uri);
        } else {
            console.error('Route "' + uri + '" is not defined.');
            return false;
        }
    }
function(uri) {
        if (this.defined(uri)) {
            history.pushState(null, null, uri);
            var event = new CustomEvent('onRouteChange');
            event.route = uri;
            document.dispatchEvent(event, uri);
        } else {
            console.error('Route "' + uri + '" is not defined.');
            return false;
        }
    }
function ( uri ) { if ( this . defined ( uri ) ) { history . pushState ( null , null , uri ) ; var event = new CustomEvent ( 'onRouteChange' ) ; event . route = uri ; document . dispatchEvent ( event , uri ) ; } else { console . error ( 'Route "' + uri + '" is not defined.' ) ; return false ; } }
Redirect to new route
@param uri
@returns {boolean}
Redirect to new route