Ember.js - 第二次调用时出现linkTo错误 [英] Ember.js - linkTo error on second call

查看:88
本文介绍了Ember.js - 第二次调用时出现linkTo错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这里是: jsfiddle



我无法使jsfiddle工作,但这里是一个运行版本的链接:在cloudfoundry上运行的版本



我使用ember-resource.js获取数据。



我有两条路线,列表和项目。

  Ember模块:
列表(控制器,路由,视图和模板)
项目(控制器,路由,视图和模板)
ItemDetail(控制器,视图和模板),它包含在Item handlebars模板中的控制器助手中。

问题是:
从默认路由访问应用程序(#/ list )以前的链接工作完美。但是当我从物品路线(#/ item / 1)访问应用程序时,上一个链接第一次可以正常工作,然后再不起作用...



我真的不知道我在做错什么...



任何帮助将不胜感激...
不要请稍候再询问
提前感谢



注意:我非常感谢ember-resource.js,但是stackoverflow标签不存在...可能有人有1500个代表创建它?

解决方案

实际上,这是一个已经解决但尚未发布的ember.js中的错误。 p>

在控件助手中,调用childViews上的rerender ...取消注释此行解决了问题。


I have a problem using ember especially the linkTo helper.

Here is the : jsfiddle

I can't make the jsfiddle work but here is a link to a running version : running version on cloudfoundry

I use ember-resource.js to get data.

I have two routes, "list" and "item".

Ember modules :
List (controller, route, view and template)
Item (controller, route, view and template)
ItemDetail (controller, view and template) which is included with the controller helper in the Item handlebars template.

The problem is : When accessing the application from the default route ("#/list") the previous link works perfectly. But when I access the application from a item route ("#/item/1"), the previous link works fine the first time and then doesn't work any more...

And I honestly don't know what I'm doing wrong...

Any help would be appreciated... Don't hesitate to ask extra info Thanks in advance

Note : I really appreciate ember-resource.js but the stackoverflow tag doesn't exist... Could anyone with 1500 reps create it?

解决方案

Actually, it's a bug in ember.js that's been solved but not yet released.

It's in the control helper that calls rerender on childViews... Uncommenting this line solved the problem.

这篇关于Ember.js - 第二次调用时出现linkTo错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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