title: Angular UI Bootstrap Modal - how to prevent multiple modals opening
body: <p>I've implemented the modal directive, and set the <code>$modal.open</code> option backdrop to <code>false</code>. However, now I can trigger multiple modals to open. Is there a way to prevent the trigger button from firing once one modal is open?</p>
  
  <pre><code>var accountSummaryCtrl = function ($scope, $modal, $log) {
  
      $scope.open = function () {
  
          var modalInstance = $modal.open({
              templateUrl: '/Apps/generic/modal/Templates/AccountSummary.html',
              controller: ModalInstanceCtrl,
              backdrop: false
          });
  
          modalInstance.result.then(function (selectedItem) {
              $scope.selected = selectedItem;
          }, function () {
              $log.info('Modal dismissed at: ' + new Date());
          });
      };
  };
  </code></pre>
  
  <p>Thanks</p>