I recently set up a page with 3 tabs using ng-switch, each tab containing a Save button with an ng-disabled attribute within the same form.
<div id="tab1" ng-switch-default="basic">
<div id="tab2" ng-switch-when="contact">
<div id="tab3" ng-switch-when="password">
<button class="btn btn-info" type="button" ng-click="save(entity)" ng-disabled="form.$invalid || form.$pristine">
Save
</button>
The issue I'm encountering is that ng-disabled only performs validation on the currently active tab. It seems like this happens because when using ng-switch, it actually removes the inactive tab from the DOM instead of simply hiding it. Should I look for a workaround with ng-switch or switch back to using ng-hide and ng-show?