title: How to call a function from another controller in AngularJS?
body: <p>I need to call a function in another controller in AngularJS. How can I do this?</p>
  <p>Code:</p>
  <pre><code>app.controller('One', ['$scope',
      function($scope) {
          $scope.parentmethod = function() {
              // task
          }
      }
  ]);
  
  app.controller('two', ['$scope',
      function($scope) {
          $scope.childmethod = function() {
              // Here i want to call parentmethod of One controller
          }
      }
  ]);
  </code></pre>