我们如何重新加载路由Ember JS(versoin 1.0.0-rc.1) [英] How can we reload a route Ember JS (versoin 1.0.0-rc.1)

查看:320
本文介绍了我们如何重新加载路由Ember JS(versoin 1.0.0-rc.1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个条件,我的路线:



application.com /#/ sample /:id 重定向到 application.com /#/ sample /:id
例如,
application.com /#/ sample / 1 获取重定向到 application.com /#/ sample / 2



这不会导致重新加载。有没有任何一个案件修正?



其实我有一个案例
application.com /#/ parent / 123 / sample / 1 导致重定向到 application.com /#/ parent / 123 / sample / 2



事件由 ParentRouter 收到 transitionTo(parent.sample,{id:2})



日志中的内容是:


未捕获错误:断言失败:在inBuffer状态下清空视图是不允许的,不应该在正常情况下发生。很可能在您的应用程序中有一个错误。这可能是由于属性更改通知过多。



解决方案

问题已解决。它是把手中的NULL处理问题。
我做了一些额外的检查空值。它现在工作了



在Github上提交了一些类似的问题,我们可以随时重新加载当前路由并重定向到任何路由。


$ b $感谢您的帮助。


I have a condition where my route:

application.com/#/sample/:id is redirected back to application.com/#/sample/:id For example, application.com/#/sample/1 gets an event which redirects to application.com/#/sample/2

This does not cause a reload. Has any one got this case fixed?

Actually I am having a case application.com/#/parent/123/sample/1 causing redirect to application.com/#/parent/123/sample/2

Event is received by ParentRouter to transitionTo("parent.sample",{id:2}).

What I get in the log is:

Uncaught Error: assertion failed: Emptying a view in the inBuffer state is not allowed and should not happen under normal circumstances. Most likely there is a bug in your application. This may be due to excessive property change notifications.

解决方案

The issue is fixed. Its was a NULL handling issue in the handlebars. I made some additional check for nulls. It works now.

There have been some similar issues filed on Github, we can always reload the current route and redirect back to any route.

Thanks for help.

这篇关于我们如何重新加载路由Ember JS(versoin 1.0.0-rc.1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆