AngularJS NG-网格,自定义按钮 [英] AngularJS ng-grid with custom button

查看:145
本文介绍了AngularJS NG-网格,自定义按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的 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> '

我已经更新这里的plunker ,以反映相同

row.entity 会给我必将此行网格的实体

row.entity will give me the entity bound to this row of the grid

这篇关于AngularJS NG-网格,自定义按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆