title: Angular/Ionic: updating ng-change value in two controllers
body: <p>I need a bit of a code review, i'm having trouble getting my ng-change function to trigger and update the value in both controllers, i've created a factory service and have injected it into both controllers but on the second AppCtrl console.log() value prints only once during initialization, and would like to have the ng-change value also update on the second controller and not only on the first.</p>
  
  <p>This is what i have so far:</p>
  
  <pre><code> &lt;ion-radio ng-repeat="rate in rates"
                         ng-value="rate.id"
                         ng-change="rateTypeChanged(rate)"
                         ng-checked="rate.selected"
                         ng-model="currentRate.selectedRate"&gt;
                         {{ rate.title }}
              &lt;/ion-radio&gt;
  </code></pre>
  
  <p>controller for sidebar: </p>
  
  <pre><code>.controller('SidebarCtrl', function($scope, typesOfRates) { 
  $scope.rates = typesOfRates.rateType;
  
    $scope.currentRate = {
        selectedRate: 'hourly'
    };
  
    $scope.rateTypeChanged = function(rate) {
        console.log("Selected goalType, text:", rate.title, "value:", rate.id);
        typesOfRates.setRate(rate.id);
    }
  </code></pre>
  
  <p>In controller 2:</p>
  
  <pre><code>   .controller('AppCtrl', function($scope, typesOfRates, $state, $rootScope) {
    console.log( typesOfRates.getRate() ); 
    //runs only once, but not again when ng-change event is triggered
  </code></pre>
  
  <p>my service:</p>
  
  <pre><code>  .factory('typesOfRates', function typesOfRates($rootScope) {
  
      var typesOfRates = {};
          typesOfRates.myRates = [];
          typesOfRates.rateType = [
              { title: "Hourly",  id: "hourly",  selected: true  },
              { title: "Daily",   id: "daily",   selected: false },
              { title: "Monthly", id: "monthly", selected: false }
          ];
  
          typesOfRates.currentRate = "hourly";
  
      var setRate = function(currentRate) {
          if (typesOfRates.myRates.length &gt; 0) typesOfRates.myRates = [];
          typesOfRates.myRates.push(currentRate);
      }
  
      var getRate = function() {
          return typesOfRates.myRates;
      }
  
      return {
          rateType: typesOfRates.rateType,
          getRate:  getRate,
          setRate: setRate
      }
  });
  </code></pre>