title: button radio change value in another controller with ng-click in angular js
body: <p>I have two controllers , a controller filter and a display controller results in the first I have a group of radio button , when you change the radio button , sending an event to change the value displayed in the second controller , the code is as follows :
  I know not coment changed immediately in the second controller</p>
  
  <p>HTML :</p>
  
  <pre><code>      &lt;div ng-controller="MyCtrl1"&gt;
      &lt;input type="radio" ng-model="value" value="evol1" ng-change="setSelectedEvol(value)" name="evol"&gt;
          &lt;br&gt;
           &lt;input type="radio" ng-model="value" value="evol2" ng-change="setSelectedEvol(value)" name="evol"&gt;
  
          &lt;/div&gt;
  
  &lt;div ng-controller="MyCtrl2"&gt;
  on change button radio evol = {{displayEvol}}
  &lt;/div&gt;
  </code></pre>
  
  <p>Angular:</p>
  
  <pre><code>var myApp = angular.module('myApp',[]);
  
      function MyCtrl1 ($scope) {
  
       $scope.setSelectedEvol = function (value) {
  
                 $scope.selectedEvol = value;
                  switch ($scope.selectedEvol) {
                      case 'evol1':
                          $scope.evol = 'Evol. VA';
                       break;
                      case 'evol2':
                          $scope.evol = 'Evol. %';
                         break;
  
                  }
  
              $rootScope.$broadcast('ctr1Data', $scope.evol);
  
      }
  
      function MyCtrl2 ($scope) {
  
       $scope.$on('ctr1Data', function (event, args) {
          $scope.displayEvol= args;
  
      });
  
  
      }
  </code></pre>