title: $BROADCASTing from service to controller
body: <p>I have a little concern here</p>
  
  <p>This comes from a service named <code>BetSlipFactory</code></p>
  
  <pre><code>  removeSlip: function(slip) {
  
      return betSlipSelectionRequest('/betSlip/removeSelection', {
        game: slip.game,
        pair: slip.pair,
        line: slip.line
      });
    }
  </code></pre>
  
  <p>Then I have this function in the controller for that service</p>
  
  <pre><code>$scope.removeSlip = function(slip) {
  
    $rootScope.$broadcast('betSlip:removeLines', slip);
    BetSlipFactory.removeSlip(slip)
  
  }
  </code></pre>
  
  <p>Next I have a controller in a different scope named <code>LinesCtrl</code> and I have this function here which calls a couple functions from the service <code>BetSlipFactory</code> which is like a kind of toggle function</p>
  
  <pre><code>$rootScope.$on('betSlip:removeLines', function(event, slip) {
    if (slip) {
      BetSlipFactory.remove(line, row, type);
    };
  });
  
  $scope.addLineToBetSlip = function(line, row, type) {
    var spreadSelected = (row.spreadSelected &amp;&amp; type === 'spread'),
      totalSelected = (row.totalSelected &amp;&amp; type === 'total'),
      moneyLineSelected = (row.moneyLineSelected &amp;&amp; type === 'moneyline');
    if (spreadSelected || totalSelected || moneyLineSelected) {
  
      BetSlipFactory.remove(line, row, type);
  
    }else {
  
      BetSlipFactory.add(line, row, type);
  
    }
  };
  </code></pre>
  
  <p>And then the HTML:</p>
  
  <pre><code>     &lt;button ng-click="removeSlip(slip)"&gt;&lt;/button&gt;
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>     &lt;td ng-class="!row.moneyLineSelected ? 'lines-hover' : 'line-selected'"&gt;
          &lt;a ng-click="addLineToBetSlip(line, row, 'moneyline')"&gt;
             &lt;span ng-hide="row.noMoneyLine"&gt;{{:: row.moneyLine}}&lt;/span&gt;
          &lt;/a&gt;
       &lt;/td&gt;
  </code></pre>
  
  <p>What I need: combine the scopes, when the function <code>$scope.removeSlip(slip)</code> is call, also I need to call <code>$scope.addLineToBetSlip(line, row, type)</code> and then that function should call <code>BetSlipFactory.remove(line, row, type);</code> as it is within that <code>if</code> statement. </p>
  
  <p>When I call $scope.removeSlip(slip) I need to kill <code>slip</code> parameter, within the scope of <code>BetSlipFactory</code> everything works great.</p>
  
  <p><a href="https://youtu.be/urL0cmRHZrI" rel="nofollow">I recorded a video for you to see what I am talking about</a>, let me explain the video a little bit.</p>
  
  <p>In the first 2 tries you might see that I am able to select and deselect and everything works great, but in the 3rd and 4th try, you see that I select a line, and then I go a call and <code>removeSlip(slip)</code> when I play the X on the right, and in order to deselect the line on the left I have to do it manually.</p>