javascript - how to fire a controller method from another controller or directive? -
what need show values automatically when process data on controller, how can fire $scope.setoncontroller1 function on controller1 when controller2 have ended process data automatically. js fiddle http://jsfiddle.net/b2fce/228/ here html code <div ng-app="myapp"> <div ng-controller="mycontroller1"> <button ng-click="setoncontroller1()">force values(second)</button><br/> <ul> <li><b>mycontroller1</b> (values won't change)</li> <li>{{stringvalue}}</li> <li>{{objectvalue}}</li> </ul> </div> <div ng-controller="mycontroller2"> <ul> <li><b>mycontroller2</b> (values change when set values clicked or when 2-way binding textbox modified)</li> <li>{{stringvalue()}}</li> <li>{...