Created
February 2, 2012 01:30
-
-
Save vojtajina/1720795 to your computer and use it in GitHub Desktop.
Angular: ng:repeat IE8 memory leak
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 id="ng-app" ng-app> | |
<head> | |
<title></title> | |
<script type="text/javascript" src="http://code.angularjs.org/0.10.6/angular-0.10.6.min.js"></script> | |
<script type="text/javascript"> | |
function Main() { | |
var $scope = this; | |
$scope.persons = []; | |
for(var i = 0; i < 5000; i++) { | |
$scope.persons.push({ | |
Name: 'name ' + i, | |
Gener: 'male ' + i, | |
Description: 'some desc ' + i, | |
Birthday: new Date(), | |
Engagement: true, | |
LastName: 'last name ' + i | |
}); | |
} | |
} | |
</script> | |
</head> | |
<body ng:controller="Main"> | |
<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 persons"> | |
<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> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment