title: Angular js, call module controller's method in the directive, which doesn't see it's scope by default
body: <p>here is the issue: I have specified routes in the application config like:</p>
  
  <pre><code>when('/url', {
      controller: 'Controller',
      templateUrl: 'url'
    });
  </code></pre>
  
  <p>in the view I have only:</p>
  
  <pre><code>&lt;div ng-view my-directive="fire()"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>the important thing that there are no 'ng-controller="MyController"' attribute.
  when user loads url, the controller fires and template is filled with model data and rendered well.</p>
  
  <p>then I have a directive that must do the following on the same page: when I click, the 'Controller' has to execute the function, get data and add render the template/add data to existing.</p>
  
  <p>the directive is:</p>
  
  <pre><code>myAppModule.directive('myDirective', function() {
    return {
      restrict: 'A',
      templateUrl: 'url',
      replace: false,
      link: function(scope, element, attrs) {
          var raw = element[0];
  
          element.bind('click', function() {
  
                  console.log('loaddata');
                  scope.$apply(attrs.fire);
  
          });
        }
  
    };
  });
  </code></pre>
  
  <p>the console.log is firing, but the <code>scope.$apply(attrs.fire)</code> - the fire() function inside the "Controller" doesn't. Key tips are:
  if I add ng-controller="Controller" in the html it will work, but will fire twice when page will load. 
  So how to tell directive to execute "Controller" fire method without using ng-controller="Controller"?</p>