Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
347 views
in Technique[技术] by (71.8m points)

angularjs - AngularJs Ui路由转换已被取代(AngularJs Ui-routing transition superseded)

过渡控制台已被取代

i find the solution AngularJS and UI-Router: 'Error: transition superseded' during angularjs unit tests but this not work for me.

(我在angularjs单元测试期间找到了解决方案AngularJS和UI-Router:'错误:过渡被替换',但这对我不起作用。)

AngularJs version v1.6.1 Ui-routing Version v0.3.2

(AngularJs版本v1.6.1 Ui路由版本v0.3.2)

  ask by Ashish Kadam translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I solved it.

(我解决了)

In my project, root state is login state if login is successful then it goes to admin.dashboard state, where admin state was an abstract state.

(在我的项目中,如果登录成功,则根状态为登录状态,然后进入admin.dashboard状态,其中admin状态为抽象状态。)

I used $state.transitionTo method instead of $state.go when transitioning to the admin.dashboard state.

(转换为admin.dashboard状态时,我使用了$state.transitionTo方法而不是$state.go 。)

I've also added on app.config section.

(我还添加了app.config部分。)

$qProvider.errorOnUnhandledRejections(false);


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...