Using angularjs 1.3.4 & ui-bootstrap-tpls 0.13.4 and bootstrap 3 css
I have a json as below:
"MasterTab1": {
"tab1": [
"somedata1",
"somedata2"
],
"tab2": [
"somedata1",
"somedata2"
]
},
"MasterTab2": {
"tab1": [
"somedata1",
"somedata2"
],
"tab2": [
"somedata1",
"somedata2"
],
"tab3": [
"somedata1",
"somedata2"
]
}
}
From above json(ignore somedata as its being used inside tabs) I want to create tabs as:
MasterTab1 MasterTab2
tab1 tab2 tab1 tab2 tab3
So basically the two tabs MasterTab1, MasterTab2 would always be there. But the child tabs under them may or may not be there and can be in any number. So when they click on MasterTab1 I want to show the relevant tabs tab1 & tab2. When they click on MasterTab2 I want to show relevant tabs tab1, tab2 & tab3.
Earlier I did not had parent child tabs so was using something like this to show tabs:
<tabset>
<tab ng-repeat="tabs in myTabsData"></tab>
</tabset>
myService.getTabData().then(function (res) {
$scope.myTabsData = res;
});
But now I am not sure how to do create this nested tabs stucture. Would appreciate if someone can help