Created
February 5, 2012 09:36
-
-
Save vojtajina/1744412 to your computer and use it in GitHub Desktop.
Angular: IE8 memory leak test case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>angular-zrm</title> | |
<script src="http://ci.angularjs.org/job/angular.js-vojta/167/artifact/build/pkg/0.10.7-3173d860/angular-0.10.7-3173d860.min.js"></script> | |
<script src="foo-controller.js"></script> | |
</head> | |
<body ng:app> | |
<div ng:controller="FooController"> | |
<button ng:click="clear()">Clear</button> | |
<button onclick="$('#content').remove()">Clear table</button> | |
<table id="content" style="border:1px solid"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Gender</th> | |
<th>Description</th> | |
<th>Birthday</th> | |
<th>Engagement</th> | |
<th>Last Name</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr class="row" ng:repeat="p in persons2"> | |
<td>{{p.Name}}</td> | |
<td>{{p.Gender}}</td> | |
<td>{{p.Description}}</td> | |
<td>{{p.Birthday}}</td> | |
<td>{{p.Engagement}}</td> | |
<td>{{p.LastName}}</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function FooController($scope) { | |
var MAX = 5000; | |
$scope.persons2 = []; | |
$scope.clear = function(){ | |
$scope.persons2 = []; | |
} | |
for (var i = 1; i < MAX; i++) { | |
$scope.persons2.push({ | |
Name:"Zhang Ruimin" , | |
Gender:"Male", | |
Description:"Good Man", | |
Birthday:"1988.08.25", | |
Engagement:"ThoughtWorks", | |
LastName:"Zhang" | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment