title: Using $scope in popup (AngularJS + Ionic)
body: <p>I followed <a href="http://ionicframework.com/docs/api/service/$ionicPopup/" rel="nofollow">documentation</a> to set a Ionic popup in my project.
  This works well except one thing.</p>
  
  <p>When I call the function, I'm not in controller (I'm in services.js), so when I define scope: $scope, I have an obvious $scope is unknown error.</p>
  
  <p>How do you solve this? Thanks a lot !</p>
  
  <p>Find bellow the full code if you need it.</p>
  
  <p>controllers.js</p>
  
  <pre><code>$scope.confirm_redeem_reward = function(asked_reward) {
        RewardModel.displayConfirmRedeemReward(asked_reward)
      };
  </code></pre>
  
  <p>services.js</p>
  
  <pre><code>...
  
    RewardModel.displayConfirmRedeemReward = function(asked_reward) {
       var confirmPopup = $ionicPopup.confirm({
         title: 'Confirmation',
         templateUrl: 'templates/popups/confirm_redeem_reward.html',
         scope: $scope,
         buttons: [{
            text: 'Cncel',
            type: 'button-default'
          }, {
            text: 'OK',
            type: 'button-positive',
            onTap: function(e) {
              RewardModel.useReward(asked_reward.id);
              RewardModel.used_reward_or_deal_name = asked_reward.name;
            }
          }]
  
       });
       confirmPopup.then(function(res) {
         // Nothing
       });
      };
  </code></pre>
  
  <p>confirm_redeem_reward.html</p>
  
  <p>Do you want to redeem the reward :<br/>
  {{asked_reward.name}} ?</p>