title: Inject data from a modal form into a parent form in AngularJS?
body: <p>I have a form with additional data fields displayed in a modal:</p>
  
  <pre><code>&lt;form class="form-horizontal" name="newForm" ng-controller="FormCtrl" ng-submit="submit()"&gt;
    &lt;label&gt;Test&lt;/label&gt;
    &lt;div ng-controller="ModalCtrl"&gt;
      &lt;a class="btn btn-link" ng-click="open()"&gt;Open&lt;/a&gt;
      &lt;ng-include src="'partials/modal.html'"&gt;&lt;/ng-include&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>includes:</p>
  
  <pre><code>&lt;div modal="shouldBeOpen" close="close()" options="opts"&gt;
      &lt;div class="modal-header"&gt;
          &lt;h4&gt;I'm a modal!&lt;/h4&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;
          &lt;ul&gt;
              &lt;input type="text" tabindex="16" ng-model="someinput" name="someinput" size="32" class="validate[someinput]" /&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
          &lt;button class="btn btn-warning cancel" ng-click="close()"&gt;Cancel&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>var ModalCtrl = function ($scope) {
  
    $scope.open = function () {
      $scope.shouldBeOpen = true;
    };
  
    $scope.close = function () {
      $scope.shouldBeOpen = false;
    };
  
    $scope.opts = {
      backdropFade: true,
      dialogFade:true
    };
  
  };
  </code></pre>
  
  <p>How can I read/inject/transfer the user input from the modal form into the main form?</p>