AlexSuleap / angular-tree-widget

Angularjs tree control, which does not require jquery.
http://AlexSuleap.github.io
MIT License
34 stars 13 forks source link

Can we call function in controller when we click on the node..? #19

Closed skandamallapa closed 7 years ago

skandamallapa commented 7 years ago

When we click on the node I need to call the function and pass the node id.

AlexSuleap commented 7 years ago

You should use 'selection-changed' event.

In controller write: $scope.$on('selection-changed', function (e, node) { //node - selected node in tree console.log(node); });