I need help with AngularJS to display JSON output. Is using gridOptions the best approach for this? I'm trying to print labels starting from the root in reverse order - label/parent's label/parent's parent's label/...
{
artifactId:"6450",
classificationId:6451,
id:3276,
hierarchyId:"lp",
label:"Authorization",
nodeId:"84",
parent:{
id:3275,
hierarchyId:"lp",
label:"Authorize",
nodeId:"83",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:23Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:23Z",
parent:{
id:3193,
hierarchyId:"lp",
label:"Actions & Verbs",
nodeId:"1",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:17Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:17Z",
parent:{
id:3192,
hierarchyId:"lp",
label:"root",
nodeId:"13190",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:14Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:14Z"
}
}
},
parentNodeId:"83",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:23Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:23Z"
},
{
artifactId:"6450",
classificationId:6452,
id:3280,
hierarchyId:"lp",
label:"Licensee",
nodeId:"88",
parent:{
id:3276,
hierarchyId:"lp",
label:"Authorization",
nodeId:"84",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:23Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:23Z",
parent:{
id:3275,
hierarchyId:"lp",
label:"Authorize",
nodeId:"83",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:23Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:23Z",
parent:{
id:3193,
hierarchyId:"lp",
label:"Actions & Verbs",
nodeId:"1",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:17Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:17Z",
parent:{
id:3192,
hierarchyId:"lp",
label:"root",
nodeId:"13190",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:14Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:14Z"
}
}
}
},
parentNodeId:"84",
createdBy:"INITIAL-LOAD",
createdOn:"2014-09-12T16:21:23Z",
updatedBy:"INITIAL-LOAD",
updatedOn:"2014-09-12T16:21:23Z"
},
Currently, my table structure doesn't seem right:
<table>
<tr ng-repeat='label in labels'>
<td> label.label </td>
<td> label.parent.label</td>
<td> label.parent.parent.label</td>
</tr>
</table>
How can I display all the labels up to the root in reverse order? In this case, it should be Root/Action&verbs/Authorize/Authorization.