I am trying to use AngularJS to validating a form. The form will be spanned across multiple pages and i want to validate each page before the user moves onto the next.
This was pretty straight forward. However, each page can contain multiple tabs and i am not sure how to switch-on and switch-off validation for specific tabs.
As you can see in the fiddle below, '#page1' has 'individual' and 'company'. User can select only one of these 2 and as per that choice, i have to disable the validation on other tab. Adding the 'ng-disabled' attribute dynamically using jQuery is not working.
How can i achieve that? Any help is appreciated.
ngDisabled takes an expression. you can set each ngDisabled attribute on each next button to call a function in your controller which checks the active tab, and also does more logic (which you have to figure out, your fiddle is hard to read ;)