Skip to content

change state inside $transition onStart hook function got Error #2977

Closed
@xr

Description

@xr
$transitions.onStart({
        to: (state) => state.auth
    }, () => {
        if (syncAuthCheckFailed()) {
                        $state.go('state_not_auth');
            return false;
        } else {
            return true;
        }
    });

error:

message: "The transition has been superseded by a different transition (see detail)."

without $state.go() everything is fine

update

even i just simply called the $state.go inside onEnter, same error appear.

onEnter: ['$state', function ($state) {
        $state.go('guest');
}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions