title: AngularJS: Access formController of a form placed inside transcluded directive from parent controller
body: <p>I've created a simple "modal dialog" directive, which uses transclude. I would like to place a form () inside the "modal dialog" directive. I would expect that formController of a form placed inside the directive, is going to be accessible in parent controller's scope, however it isn't. Take a look at the following fiddle, please: <a href="http://jsfiddle.net/milmly/f2WMT/1/" rel="noreferrer">http://jsfiddle.net/milmly/f2WMT/1/</a></p>
  
  <p>Complete code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;AngJS test&lt;/title&gt;
          &lt;link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/foundation/4.0.9/css/foundation.min.css"&gt;
          &lt;style&gt;
              .reveal-modal {
                  display: block;
                  visibility: visible;
              }
          &lt;/style&gt;
          &lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript"&gt;
              var app = angular.module('app', []);
              app.controller('appCtrl', function ($scope) {
                  $scope.model = {
                      id: 1, name: 'John'
                  };
                  $scope.modal = {
                      show: false
                  };
             });
             app.directive('modal', function () {
                 return {
                     scope: {
                         show: '='
                     },
                     transclude: true,
                     replace: true,
                     template: '&lt;div class="reveal-modal small" ng-show="show"&gt;&lt;div class="panel" ng-transclude&gt;&lt;/div&gt;&lt;/div&gt;'
                 }
             });
         &lt;/script&gt;
      &lt;/head&gt;
      &lt;body ng-app="app"&gt;
          &lt;div ng-controller="appCtrl"&gt;
              &lt;div class="panel"&gt;
                  Id: {{ model.id }}&lt;br&gt;
                  Name: {{ model.name }}&lt;br&gt;
                  Controller formController: {{ form }}&lt;br&gt;
                  Directive formController: {{ myForm }}&lt;br&gt;
              &lt;/div&gt;
  
              &lt;form name="form" class="panel"&gt;
                  &lt;input type="text" ng-model="model.name"&gt;
              &lt;/form&gt;
  
              &lt;a ng-click="modal.show=!modal.show"&gt;toggle dialog&lt;/a&gt;
  
              &lt;div modal show="modal.show"&gt;
                  &lt;form name="myForm"&gt;
                      &lt;input type="text" ng-model="model.name"&gt;
                  &lt;/form&gt;
              &lt;/div&gt;
  
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So my question is how to access or is it possible to access directive's formController from parent controller?</p>
  
  <p>Thank you for answers.</p>
  
  <p>-Milan</p>