Last active
January 13, 2017 09:09
-
-
Save benoror/22f0e5f81dd007c53b74 to your computer and use it in GitHub Desktop.
angular-formly with bootstrap's nav tabs (multiple formly-form)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"form": [ | |
{ | |
"type": "tabset", | |
"tabs": [ | |
{ | |
"title": "tab1", | |
"fields": [...] | |
}, | |
{ | |
"title": "tab1", | |
"fields": [...] | |
} | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tabset ng-repeat="tabset in form | filter:{type:'tabset'}"> | |
<tab ng-repeat="tab in tabset.tabs | filter:{type:'tab'}" | |
heading="{{tab.title}}" | |
active="tab.active" | |
disable="tab.disabled"> | |
<formly-form model="model" fields="tab.fields"> | |
</formly-form> | |
</tab> | |
</tabset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment