Sean Sean - 8 months ago 45
AngularJS Question

Accessing a form in an Angular-UI uib-tab

If you have a form in a

, how do you access it to (eg) validate the form?

Here's a plunker:

When I try access
it's undefined (the form inside the uib-tab). But if I do the same with
I get access to form validation etc.


The uib-tabset has its own scope, so the forminside will be on the scope of the uib-tabset. If you use the controller-as notation, it will find the correct scope (the one of the controller):

<uib-tab index="0" heading="Tab 1">
    <form name="vm.forminside">

See this edited plunker.