ngTable grid and Actionsheet


#1

Can I use actionsheet when I click a ngTable grid row??
If so, could you guys give me some tips how to achieve that?
Is there any examples?
Thanks.


#2

assuming that your ng table are like this:

<table ng-table="tableParams" class="table">
    <tr ng-repeat="user in $data">
        <td data-title="'Name'">{{user.name}}</td>
        <td data-title="'Age'">{{user.age}}</td>
    </tr>
    </table>
</div>

You could add a ng-click directive in the tr or td element of the table. for example:

<table ng-table="tableParams" class="table">
    <tr ng-repeat="user in $data" ng-click='myFunction(user)'>
        <td data-title="'Name'">{{user.name}}</td>
        <td data-title="'Age'">{{user.age}}</td>
    </tr>
    </table>
</div>

Every click on the ROW will call myFunction passing the user as a parameter.


#3

Thanks man. You saved my life!! haha
Valeu!! =D