Using Angular here:
I am creating dynamic controls and tabs based on the json I get. So if my incoming json object is like below then I am creating 2 master tabs and then child tabs under them.
"MasterTab1": {
"tab1": ["somedata1-1", "somedata1-2"],
"tab2": ["somedata2-1", "somedata2-2"]
},
"MasterTab2": {
"tab1": ["somedata2-1-1", "somedata2-1-2"],
"tab2": ["somedata2-2-1", "somedata2-2-2"],
"tab3": ["somedata2-3-1", "somedata2-3-2"]
}
Now each child tabs can have some controls under them, like textbox, dropdowns etc example as below:
<tabset class="tabbable-line">
<tab ng-repeat="(key,value) in tabstest1" heading="{{key}}">
<tabset class="tabbable-line">
<tab class="tabbable-line" ng-if="key=='MasterTab1'" ng-repeat="(k2,v2) in value" heading="{{k2}}">
{{ v2 }}
</tab>
<tab class="tabbable-line" ng-if="key=='MasterTab2'" ng-repeat="(k2,v2) in value" heading="{{k2}}">
{{ v2 }}
</tab>
</tabset>
</tab>
</tabset>
I have created demo as below. The demo contains few controls that can be inside the tabs.
Demo https://jsfiddle.net/43qj5kys/1/
What I am stuck is, once user fills in the controls and the data how shall I get the data from there.
I have a button click, when the user clicks on this button I want to get all the data which the user selected in all the controls of these tabs.
Any inputs are appreciated.
Anyone?
angular-ui-bootstrap? The answer you accepted two days ago used a more relevant version of the library.