I have created tab controls and each tab is using different controller. Each tab has some input types and also it has got validations. I have used form for each tabs and different controller for each tabs. I want to validate the form when i click on another tab. For example if there is any invalid value in Tab 1 then when user clicks on Tab 2 it should validate Tab 1 and if any invalid value is found then it should focus the invalid field and do not allow to switch tabs. Switching of tabs should be allowed only when form in the tab is valid.
Now i am not able to check whether form is valid or not during tab switch because tab DOM is out side the form and its controller. So i cant access formname.$valid property. So how i can handle this scenario?
Here is sample plunker