0

I have 2 forms. One is a regular form (TestForm) and the other is inside a foundation tab.

Page 1:

<div class="columns small-8">
            <form name="testForm">
            </form>
        </div>

<div class="row">
    <div class="section-container tabs" data-section="tabs">
        <section class="section active">
            <p class="title"><a href="#data" ng-click="getData('userData')">Gegevens</a></p>
            <div class="content" data-slug="data">
                <div ng-include src="'partials/user/UserData.html'"></div>
            </div>
        </section>
    </div>

</div>

UserData.html (the tab):

<form name="debugForm"></form>

So the problem is below that I can't reach my debugForm. Does anyone know how to reach the form? (need to set validity)

enter image description here

Also when I trie to reach by going via the child scope: $scope.$$childHead.debugForm

doesn't work.

Vincent
  • 6,058
  • 15
  • 52
  • 94

2 Answers2

0

The problem is that you can't access child scopes from a parent scope in angular. I temporarily "solved" it by just not using the include and instead just put the html in there.

Still open for better suggestions though..

Vincent
  • 6,058
  • 15
  • 52
  • 94
-1

Try src="partials/user/UserData.html" (whithout ' )

Vicent
  • 1
  • I think doing this breaks the foundation tab. When I do this, the tabs don't work as in no content is shown at all. – Vincent Nov 07 '13 at 08:50
  • Also have a look at http://stackoverflow.com/questions/13943471/angularjs-ng-include – Vincent Nov 07 '13 at 08:53
  • I have also tried the following: src="mySecondForm" and in my controller $scope.mySecondForm="partials/user/UserData.html" This way, the form is shown, but I still can't reach it – Vincent Nov 07 '13 at 08:58