AngularJS NG-网格,自定义按钮 [英] AngularJS ng-grid with custom button
问题描述
我使用的 NG网的角度按钮。我需要知道如何从网格中点击我的身份的按钮。
I am using angular button in a ng-grid. I need to know how can i identity which button was clicked from within the grid.
我猜复杂的部分是,在选择行之前单击该按钮(只是我的分析,大概不会有解决方案帮助:)
I guess part of the complexity is that the button is clicked before the row is selected (Just my analysis,probably wont help with the solution :)
网格外观快拍
一个plunker说明问题这里
A plunker illustrating the problem here
推荐答案
我已经能够找出如何解决我的问题,基本上是在行传为你的功能NG-单击某个参数。 NG-点击=保存(行)
I have been able to find out how to resolve my question,basically pass in "row" as an argument on your function for ng-click. ng-click="save(row)"
在
.. ng-click="edit(selectedItem)" >Edit</button> '
在
.. ng-click="edit(row)" >Edit</button> '
row.entity
会给我必将此行网格的实体
row.entity
will give me the entity bound to this row of the grid
这篇关于AngularJS NG-网格,自定义按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!