我在 Angular js 中使用 wijgrid 组件,我遇到了无法对其执行点击事件的问题。在 wijgrid html 组件中未编译,找到 html 代码
<wij-grid id = "dataGrid" allow-sorting="true" data="data" columns-autogeneration-mode="none" allow-paging="true" >
<columns>
<column data-key="name" header-text="Name"></column>
<column data-key="address" header-text="Address" ></column>
<column data-key="submit" header-text="Submit"></column>
</columns>
</wij-grid>
和我的角度 js 代码
$http.get(url,data).success(
loadData);
function loadData(responseData) {
if (responseData != null) {
var data = responseData;
for (index = 0; index < data.length; index++) {
data[index].address = data[index].addressLineOne+","+data[index].addressLineTwo;
$SubmitBtn = "<a href='javascript:void(0);ng-click='submitCode("+data[index].reviewId+",true)'>Approve</a>"; data[index].submit=$ASubmitBtn;
}
$scope.data = data;
$("#content").wijtabs();
}
}
$scope.submitCode= function(id, status) {
alert(id+" "+status)
}
HERE 提交代码函数未调用,并且在查看源代码中该函数显示 id 和状态。这意味着它未在 wijgrid 模块中编译,请帮助我提供解决方案。我试图编译代码 $compile($sumitBtn)($scope) 但它不起作用,请建议我 s0lution