Join the Stack Overflow Community
Stack Overflow is a community of 6.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I am trying to make "Diagrams" parent under all folders will be children , i have to display Diagrams text as a first folder for tree list so user can expand and collapse ? Its not showing tree with below code.How to get object text and treelist ?

main.html

<treecontrol class="tree-classic" tree-model="dataForTheTree" options="treeOptions" on-selection="showSelected(node)" selected-node="node1" id="treecontrol">
  <span style="padding:10px;">
      <span context-menu="menuOptions" model="node" ng-if="node.text !== 'My Folder' && node.text !== 'Shared By Me' && node.text !== 'Shared To Me' && node.text !== 'Public Folder'">
          <span ng-click="importXMLFunction(node)">{{node.text}}</span>
      </span>
      <span ng-if="node.text === 'My Folder' || node.text === 'Shared By Me' || node.text === 'Shared To Me' || node.text === 'Public Folder'">
          <span>{{node.text}}</span>
      </span>
  </span>
</treecontrol>

ctrl.js

  $scope.dataForTheTree = {
  "Diagrams": [{
    "text": "My Folder",
    "children": myFolderArray
  }, {
    "text": "Shared By Me",
    "children": sharedByMeArray
  }, {
    "text": "Shared To Me",
    "children": sharedToMeArray
  }, {
    "text": "Public Folder",
    "children": publicFolderArray
  }]
  };
share|improve this question
    
The js snippet has syntax errors. Did you miss something from the beginning? Or do you need the catch? – Balázs Édes Jan 19 at 23:50
    
i dont need a catch i want to solve actual problem as i mentioned in question. – hussain Jan 20 at 3:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.