title: AngularJS creating additional scopes on opening modal dialog multiple times
body: <p>I have a modal with angular-UI bootstrap. Because I've a dozen of different forms I want to show in the modal, I'm using a ng-include directive inside the modal. The src attribute is changing dynamically.</p>
  
  <p>I saw the following behavior with batarang (even with a static src for ng-include):</p>
  
  <p>Every time opening the modal, an additional scope is created! 
  Because this modal will be opened and closed many times I will get dozens of new scopes and the application is getting very slow.</p>
  
  <p>The <strong>index.html</strong>:</p>
  
  <pre><code>&lt;body ng-controller="MainCtrl"&gt;
    &lt;p&gt;&lt;button class="btn" ng-click="showModal()"&gt;show Form&lt;/button&gt;&lt;/p&gt;
  
    &lt;div class="modal" modal="theModal" close="closeModal()"&gt;
      &lt;div ng-include src="'form1.html'"&gt;&lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The <strong>app.js</strong> is quite primitiv:</p>
  
  <pre><code>app.controller('MainCtrl', function($scope) {
    $scope.showModal = function() { 
      $scope.theModal = true; 
    };
  
    $scope.closeModal =function(){
      $scope.theModal = false;
    };  
  });
  </code></pre>