gpt4 book ai didi

javascript - 在 jqxGrid 中渲染 AngularJS 指令

转载 作者:行者123 更新时间:2023-11-29 21:55:10 24 4
gpt4 key购买 nike

使用 jqxGrid 制作包含数据的表格(显然)。

我已经在 jqxGrid 中加载了我的 Angular Directive(指令)元素,数据更新网格很好,但它只是停留在那里,未渲染,我不知道如何触发渲染。

这是我的 jqx 设置:

   AppvisAgentsCtrl.settings = {
autowidth: true,
...
columns: [

{ text: 'A', cellsrenderer: insertActionMenu, width: 50 },
...
]
}

insertActionMenu 现在就是这样:

function insertActionMenu(){

var output = [
'<actionmenu></actionmenu>'
].join('');

return output;
}

我的问题是在 DOM 检查器中,我只会看到 <actionmenu></actionmenu>坐在每一列的页面上,我想告诉它呈现它应该是的指令。

是的,actionmenu 指令有效我在整个应用程序中多次使用它。

编辑

一切都在 jqx-grid 指令中:

<jqx-grid 
jqx-settings="appvisagents.settings"
jqx-source="appvisagents.testData.things">
</jqx-grid>

最佳答案

假设这是在一个指令中发生的,你需要编译'<actionmenu></actionmenu>'在添加之前。见 $compile服务here

关于javascript - 在 jqxGrid 中渲染 AngularJS 指令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26833510/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com