Here is my jsfidder: Demo.
I'm trying to use the AngularJS Treeview and it's the official demo .
<div
data-angular-treeview="true"
data-tree-model="data"
data-node-id="value"
data-node-label="value.artifactId"
data-node-children="children" >
</div>
I want to set the node name with the data in value. For example, the name of node
"value": {artifactId": "mock", "groupId": "com.myproject", "scope": "compile", "type": "jar", "version": "0.0.1-SNAPSHOT"}
should be mock.0.0.1-SNAPSHOT
. I want to know how to set the value of the data-node-label
.
Can you change the feeding JSON format as below.
I have taken only few records just to show the syntax.
{
"roleName" : "sts.api",
"roleId" : "com.myproject.sts",
"scope": "compile",
"type": "jar",
"version": "0.0.7-SNAPSHOT",
"children" : []
},
{
"roleName" : "simbacall.api",
"roleId" : "com.myproject.simba",
"scope": "compile",
"type": "jar",
"version": "1.1.0.0-SNAPSHOT"
"children" : [
{
"roleName" : "javax.ws.rs-api",
"roleId" : "javax.ws.rs",
"scope": "compile",
"type": "jar",
"version": "2.0",
"children" : []
},
{
},
...
]