title: Use Angular ngClick to call function assigned to a different controller
body: <p>I have two controllers, one controller being for a form, which is called when the form's button is clicked, and one controller being for a div, which is interpollated using scope and {{}}. The problem is that I need to pass the data collected after the form is submitted to the other controller. How can I call that second controller's function within the first controller's function: </p>
  
  <pre><code>//FIRST CONTROLLER, CALLED BY CLICKING BUTTON
  app.controller('FormController', function ($scope) {
      $scope.IdSubmitted = function () {
          $scope.datatokens = json_datatokens;
          //WHERE I NEED TO CALL THE SECOND CONTROLLER, AND PASS IT "json_datatokens"
      }
  });
  
  //SECOND CONTROLLER
  app.controller('#10Controller', function ($scope) { 
  
      $scope.datatokens = json_datatokens;    
  });
  </code></pre>
  
  <p>HTML: </p>
  
  <pre><code>#FORM
  &lt;div ng-controller="FormController"&gt;
      &lt;form class="search-wrapper" onsubmit='load_button();fetch_data();return false;'&gt;
          &lt;input type="text"&gt;
          &lt;button type="submit" class="button " ng-click="IdSubmitted()"&gt;Submit Info&lt;/button&gt;
      &lt;/form&gt;
  
  #DIV
          &lt;div ng-controller='#10Controller' ng-init="init()"&gt;
              &lt;p&gt;Your payment is {{datatokens["DB.PMT"]}}&lt;/p&gt;
          &lt;/div&gt;
  </code></pre>