title: how to get selected node value for treeview using click event in angularjs directives
body: <p>i am using directive concept in angularjs to display selected node value for tree view using click event function in angularjs.below is my sample code</p>
  
  <p>Tree.html:</p>
  
  <pre><code>&lt;div
    data-angular-treeview="true"
    data-tree-model="roleList"
    data-node-id="roleId"
     data-node-label="roleName"
     data-node-children="children"
      data-ng-click="selectNode(roleList[1])"
      data-node-children="children"&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>treeviewcontroller.js:</p>
  
  <pre><code>$scope.roleList1 = [
          { "roleName" : "User", "roleId" : "role1", "children" : [
            { "roleName" : "subUser1", "roleId" : "role11", "children" : [] },
            { "roleName" : "subUser2", "roleId" : "role12", "children" : [
              { "roleName" : "subUser2-1", "roleId" : "role121", "children" : [
                { "roleName" : "subUser2-1-1", "roleId" : "role1211", "children" : [] },
                { "roleName" : "subUser2-1-2", "roleId" : "role1212", "children" : [] }
              ]}
            ]}
          ]},
  
          { "roleName" : "Admin", "roleId" : "role2", "children" : [] },
  
          { "roleName" : "Guest", "roleId" : "role3", "children" : [] }
  
  
  
        ];
  </code></pre>
  
  <p>Treeview.js:</p>
  
  <pre><code>    scope.selectNode = function(val)
      {
      alert(val.roleName);
      }
  
  
  
  output:
  user
        subuser1
        subuser1-1
   Admin
       subadmin1
  </code></pre>
  
  <p>from this output in alert place 'Admin' will be dispalyed by click on Admin node.but i want to display dynamically selected node value in click event function.please suggest me how to do this. 
  Thanks</p>