Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 重新渲染器视图会导致错误_Javascript_Ember.js_Ember App Kit - Fatal编程技术网

Javascript 重新渲染器视图会导致错误

Javascript 重新渲染器视图会导致错误,javascript,ember.js,ember-app-kit,Javascript,Ember.js,Ember App Kit,我想在单击页面中的任何位置时更改页面的布局。 基本上,在我的应用程序视图中,我创建了一个函数来更改layoutName,然后重新渲染视图 application.js(视图) 应用程序.hbs {{outlet}} Layout 1 header {{yield}} Layout 1 footer Layout 2 header {{yield}} Layout 2 footer 应用程序布局1.hbs {{outlet}} Layout 1 header {{yield}} Layou

我想在单击页面中的任何位置时更改页面的布局。 基本上,在我的应用程序视图中,我创建了一个函数来更改layoutName,然后重新渲染视图

application.js(视图)

应用程序.hbs

{{outlet}}
Layout 1 header
{{yield}}
Layout 1 footer
Layout 2 header
{{yield}}
Layout 2 footer
应用程序布局1.hbs

{{outlet}}
Layout 1 header
{{yield}}
Layout 1 footer
Layout 2 header
{{yield}}
Layout 2 footer
应用程序布局2.hbs

{{outlet}}
Layout 1 header
{{yield}}
Layout 1 footer
Layout 2 header
{{yield}}
Layout 2 footer
它工作得很好,但根据我所在的页面,我会从Ember中得到一些错误

从第1页,当我单击时,我得到:

断言失败:尝试注册id已在中的视图 用法:null

第2页:

TypeError:无法读取null的属性“parentNode”

你知道这些错误是从哪里来的吗?
谢谢

我也遇到了类似的问题,并尝试在一个虚拟环境中重新创建它,但在那里效果很好。不过,在我真正的应用程序中,我在rerender上遇到了一个关于缺少contextualElement的错误。