Hi guys, I am now trying to display data from a JSON data on an ion-list.
I have tried to use “ng-repeat” and “collection-repeat” to present those data and they are not working.
I am not sure if it is because my complex JSON structure, it is like:
{
"items":[
{
"username":"abc",
"orderID":"1234",
"commentHistory":[
{
"comment":"Comment Date: 2016/12/09 13:44:23"
},
{
"comment":"Failed: 2016/12/08 11:42:12"
}
],
.........
}
]}
Most of the example I saw on web are only containing a single array for the JSON, but now I am having a few arrays for the json, i am not so sure how to write to code to access those data, like, should I write {{items.commentHistory.comment}} or {{items[].commentHistory[].comment}} ??
Also, I was thinking if there is any questions of my javascript. So I would like to ask how should I write the controller to get the JSON file such that its data can be accessed?
Moreover, I was trying to get the JSON data to a ion-list, if I want to click on an ion-item on the list, and to display its detailed information in another column? In what way I should do that, is it enough to use “ng-show” or “ng-hide” for it?
It would be grateful if you can provide me some directions. Thank you for your time to read my question.
Best regards,
ITDog