I have created some mock datas that I will use in my angular app project with the following structure:
var videos = [
{
category:
[
{ explainer:
[
'explain1',
'explain2',
'explain3',
]
},
{ cartoon:
[
'cartoon1',
'cartoon2',
'cartoon3',
]
},
{ moGraph:
[
'moGraph1',
'moGraph2',
'moGraph3',
]
},
]
}
];
Ok here are the things I want to do with the data:
- display the category names(explainer, cartoons, moGraph)
- display the datas inside each categories(ex. when a user selects moGraph, all the available data under moGraph will be shown)
I tried to use <ng-repeat="video in videos track by $index"> but I only manage to make it work on single dimensional array like (var projects = [ 'proj1', 'proj2', 'proj3'];)
Im really confuse on how to do this, please enlighten thanks'much
categoryarray object. Now ifcategorywere just an object with keys, that would be workable, iecategory: { explainer: [...], cartoon: [...], moGraph: [...] }