0
I’m using the Tree-grid-Directive (https://github.com/khan4019/tree-grid-directive) in an Angularjs application and would like to know how to return the object representing the current row in the tree.
For example, I have the following column definition:
$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 clicking the button, it pass as parameter to the ng-click function the value of the line that is the button.
Thanks in advance!