I'm using the tree-grid-directive ( link ) in an angularJS application and would like to know how to return the object that represents the current row in the tree.
For example, I have the following definition of columns:
$scope.col_defs = [
{
field: "Nome"
},
{
field: "Ação",
cellTemplate: $templateCache.get('botoesTree.html'),
cellTemplateScope: {
executar: function () {
// Onde gostaria de receber o valor do registro
// atual(no caso clicado) da árvore
executar();
}
}
}];
And in the view I have the following code:
<script type="text/ng-template" id="botoesTree.html">
<button class="btn btn-sm btn-danger" ng-click="cellTemplateScope.executar()">Excluir</button>
</script>
I would like when I click the button, it passes as parameter to the function of the ng-click the value of the line that is the button.
Thank you in advance!