我正在尝试使所有文件夹下的“图表”父级都是子级,我必须将图表文本显示为树列表的第一个文件夹,以便用户可以展开和折叠?它没有显示带有以下代码的树。如何获取对象文本和树列表?
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
}]
};