title: AngularJS directive with dynamic controller
body: <p>I have a angularJS directive, and i need to do some function from a controller, but i need to get the controller dynamic, for example.</p>
  
  <p>In html A.html i use the directive</p>
  
  <p></p>
  
  <p>The directive template code is:</p>
  
  <pre><code>template: '&lt;div class="input-group autocomplete-holder"&gt;&lt;form ng-submit="submit()"&gt;[...]&lt;/div&gt;'
  </code></pre>
  
  <p>The submit() method exists in this html controller, now, i send the controller to directive this:</p>
  
  <pre><code>define(['angular', 'admin/AdminStockWarehouseController'], function (angular, AdminStockWarehouseController) {
      'use strict';
  </code></pre>
  
  <p>Now, i need to send other controller, with same function name, then, this will fails, then my question is:</p>
  
  <p>There is any way to get the current controller in a directive to use the submit function thats correspondant or send the function to do in form submit?</p>