w2ui 网格重新渲染问题

w2ui grid RE-rendering issue

我正在使用 w2ui 网格 (1.4) 和 angular 1.3.4 试图在一个视图中呈现网格。 但是首先加载网格加载 successfully.But 当我更改视图网格时无法加载抛出一些错误

ERROR: The parameter "name" is not unique. There are other objects already created with the same name (obj: grid).
ERROR: The parameter "name" is not unique. There are other objects already created with the same name (obj: layout). 

那么每次都成功加载网格的正确方法是什么。 我无法更改布局名称和网格名称。

下面是 plnkr 的 link: http://plnkr.co/edit/HzxZwJ22z2ywYmlchxFM?p=preview

你应该先销毁 w2ui 对象

if(w2ui.hasOwnProperty('layout')){
  w2ui['layout'].destroy();
}
if(w2ui.hasOwnProperty('grid')){
  w2ui['grid'].destroy();
}

或通过

重复使用它们
w2ui.layout.content('left',w2ui['grid'])