title: How to call one controller's function from another controller
body: <p>I was wondering if is it possible to call one controller's function from another controller. This way i tried but failed:</p>
  
  <pre><code>&lt;div ng-app="MyApp"&gt;
      &lt;div ng-controller="Ctrl1"&gt;
          &lt;button ng-click="func1()"&gt;func1&lt;/button&gt;
      &lt;/div&gt;
      &lt;br&gt;
      &lt;div ng-controller="Ctrl2"&gt;
          &lt;button ng-click="func2()"&gt;func2&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>var app = angular.module('MyApp', []);
  
  app.controller('Ctrl1', function($scope) {
  
    $scope.func1 = function() {
      alert('Ctrl1 and func1')
    }
  
      $scope.$on("MyFunction", function () {
          alert('Ctrl1 MyFunction')
      });
  });
  
  app.controller('Ctrl2', function($scope) {
  
    $scope.func2 = function() {
      alert('Ctrl2 and func2')
      $scope.$emit("MyFunction");
    }
  
  });
  </code></pre>
  
  <p>when func2 is calling then i used <code>$scope.$emit("MyFunction");</code> to call Ctrl1 <code>MyFunction</code> but it does not worked. so is it not possible ?</p>
  
  <p>please put some light here.</p>