javascript - IVH TreeView Twistie 没有触发与其绑定的功能
问题描述
我已经实现了 IVH 树视图并且运行良好。
但是在运行时,我需要为我的 JSON 获取“儿童”数据,因此尝试将我的 API 调用绑定到 IVH TreeView 的 Collapsed Twistie,如下所示,但它不会触发该函数getChildrenNodes(node.Code)
。有人可以帮我吗?
app.config(['ivhTreeviewOptionsProvider',
function (ivhTreeviewOptionsProvider) {
ivhTreeviewOptionsProvider.set({
idAttribute: 'Code',
labelAttribute: 'Name',
childrenAttribute: 'children',
selectedAttribute: 'selected',
useCheckboxes: true,
expandToDepth: 0,
defaultSelectedState: true,
validate: true,
twistieExpandedTpl: '<span class="show-hide"><i class="fa fa-minus"></i></span>',
twistieCollapsedTpl: '<span ng-show="node.HasChildren" ng-click="getChildrenNodes(node.Code)" class="show-hide"><i class="fa fa-plus"></i></span>',
twistieLeafTpl: '',
});
}
]);
解决方案
推荐阅读
- assembly - CPU 对寄存器的操作如何影响内存?
- python - 如何将一个 shell 脚本中的错误代码捕获到另一个 shell 脚本中
- python - 解压没有文件的泡菜变量?
- javascript - 为什么 JavaScript 中的 tagName 方法以大写字母返回 HTML 标签?
- excel - 我需要在 Excel 中查找字符串中的单词并返回一个值
- excel - 在单元格中找到单词“year”并考虑单词前面的数字
- c++ - 在 C++ 中管理一个中文 .txt
- spring-boot - 使用 Spring Cloud Sleuth 2.0 记录 MDC
- docker - 我可以让 docker 容器从图像中重新启动吗?
- ios - 使用 Swift 将信息从 ViewController 传递到 ViewController