Open softengi opened 9 years ago
Can i somehow define the children from the second level JSON object? like -
function Children($scope) { $scope.treedata=[ {id:"id1", label: "Node 1", linkParent: {links: [ {id:"id1.1", label: "Node 1.1", linkParent: {links: {}}}, {id:"id1.2", label: "Node 1.1", links: {}} ]}}, {id:"id2", label: "Node 2", linkParent: {links: []}}, {id:"id3", label: "Node 3", linkParent: {links: []}}, {id:"id4", label: "Node 4", linkParent: {links: []}} ];
$scope.opts = { nodeChildren: "linkParent.links" };
}
have you tried that? looking at the tree implementation this may just work...
Yup. Have tried that. Does not work. No children get listed at all.
Can i somehow define the children from the second level JSON object? like -
function Children($scope) { $scope.treedata=[ {id:"id1", label: "Node 1", linkParent: {links: [ {id:"id1.1", label: "Node 1.1", linkParent: {links: {}}}, {id:"id1.2", label: "Node 1.1", links: {}} ]}}, {id:"id2", label: "Node 2", linkParent: {links: []}}, {id:"id3", label: "Node 3", linkParent: {links: []}}, {id:"id4", label: "Node 4", linkParent: {links: []}} ];
}