Hi Carlos,
Thanks for using Syncfusion Products,
How can I use treeview events with angularjs? Can you give an examples.
We would like to let you know that, in angular binding all the properties and events which is used in our controls are prefixed with the “e-“. So, we need to define the treeview events with “e“.For example, “create” and “nodeCheck” events of treeview control as “e-create” and “e-nodeCheck” respectively. Please find the below code for the same,
<div id="treeView" ej-treeview e-create="create" e-nodecheck="check" /> |
Similarly, you can use all the events of treeview control by adding the prefix “e-” before the event name in angular binding.
And we need to trigger the event within the scope in the script section as shown below code,
<script>
angular.module('treeApp', ['ejangular']).controller('TreeCtrl', function ($scope){
$scope.create = function () {
console.log("create event");
};
$scope.check = function () {
console.log("nodeCheck event");
};
});
</script> |
Also, we have prepared the sample based on this and you can find the sample under the following location,
Sample Location: Treeview event Sample
To know more details about all the properties, methods and events information of all the component including treeview component in the below API link,
http://help.syncfusion.com/cr/js
Kindly let us know if you have further queries.
Regards,
Kasithangam