0
我想從UI網格cellTemplate調用一個javascript函數,將一些行的實體值作爲參數傳遞。將UI網格行數據綁定到單元格中的javascript調用
如果我直接從href調用函數,它會得到前面的'unsafe'。
如果我把它從onclick屬性不正確地綁定(儘管沒有得到不安全的預謀。)
我應該如何稱呼它,並將它正確綁定?
HREF嘗試:
columnDefs: [
{ name: "DocNumber", cellTemplate: '<a href=\'javascript:apci.LoadDoc("{{grid.appScope.selectedPayer.PayerRef}}")\'>{{row.entity.DocNumber}}</a>' },
]
的onclick嘗試:
columnDefs: [
{ name: "DocNumber", cellTemplate: '<a href="#" onclick=\'javascript:apci.LoadDoc("{{grid.appScope.selectedPayer.PayerRef}}")\'>{{row.entity.DocNumber}}</a>' },
]
角1.5.0 UI網格4.0.6