We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Treeview events with angularjs

Thread ID:

Created:

Updated:

Platform:

Replies:

118317 Feb 24,2015 06:10 PM Feb 25,2015 05:05 AM JavaScript 1
loading
Tags: ejTreeView
Carlos Gaviria Gallego
Asked On February 24, 2015 06:10 PM

Hi.

How i can use treeview events with angularjs? any example?

Thanks.

Kasithangam C [Syncfusion]
Replied On February 25, 2015 05:05 AM

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



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;