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.
I saw the following behavior with batarang (even with a static src for ng-include):
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.
The index.html:
<body ng-controller="MainCtrl">
<p><button class="btn" ng-click="showModal()">show Form</button></p>
<div class="modal" modal="theModal" close="closeModal()">
<div ng-include src="'form1.html'"></div>
</div>
</body>
The app.js is quite primitiv:
app.controller('MainCtrl', function($scope) {
$scope.showModal = function() {
$scope.theModal = true;
};
$scope.closeModal =function(){
$scope.theModal = false;
};
});