function goto(state, opts) {
        const $state = $injector.get('$state');
        if (opts === undefined) {
            return $state.go(state);
        }

        return $state.go(state, opts);
    }
/**
     * Helper function to redirect the user to a new state
     * @param {string} state Name of the state to redirect to
     * @param {Object} [opts] Optional parameters to pass to the state
     */
Helper function to redirect the user to a new state
@param {string} state Name of the state to redirect to
@param {Object} [opts] Optional parameters to pass to the state
Helper function to redirect the user to a new state @param { string } state Name of the state to redirect to @param { Object } [ opts ] Optional parameters to pass to the state
function goto(state, opts) {
        const $state = $injector.get('$state');
        if (opts === undefined) {
            return $state.go(state);
        }
        return $state.go(state, opts);
    }
function goto ( state , opts ) { const $state = $injector . get ( '$state' ) ; if ( opts === undefined ) { return $state . go ( state ) ; } return $state . go ( state , opts ) ; }
Helper function to redirect the user to a new state
 @param {string} state Name of the state to redirect to
 @param {Object} [opts] Optional parameters to pass to the state
Helper function to redirect the user to a new state @param { string } state Name of the state to redirect to @param { Object } [ opts ] Optional parameters to pass to the state