Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ER的controller提供的abort不能打断已经在加载中的action的异步状态 #119

Open
leowang721 opened this issue May 8, 2014 · 3 comments

Comments

@leowang721
Copy link
Member

ER的controller,子Action的渲染方法renderChildAction中指定abort为loader的,但是有个问题,子Action已经enter了,Model尚在loading,这时候使用abort无法打断子Action的渲染,而子Action的实例又只能loadingChildAction为resolved才暴露到外面

我这时在外面去调用abort实际上无法打断子Action的渲染,而且此时无法在外面获取到子Action的实例,也就无从调用leave方法

loader.abort就是标记了aborted为true,能够不去enterAction,但是Action已经enter了,当前已经是第二个阶段了,就是Action.enter返回的Promise

@otakustay
Copy link
Member

需要一个更完美的多级异步(a -> b -> c这样,随时可能中断)的处理,不是个很容易的事,预计在2个版本后修复

@leowang721
Copy link
Member Author

我搞了个临时性质的解决方案,只能先修改代码用着了。

@otakustay
Copy link
Member

求你的解决方案……做个参考

发自我的 iPad

在 2014年5月15日,下午8:45,Leo Wang [email protected] 写道:

我搞了个临时性质的解决方案,只能先修改代码用着了。


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants