From 3410f65e790a81d457b4f4601a1e760a6f8ede5e Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski Date: Wed, 16 Oct 2013 15:15:21 +0200 Subject: perf(jqLite): implement and use the `empty` method in place of `html(‘’)` jQuery's elem.html('') is way slower than elem.empty(). As clearing element contents happens quite often in certain scenarios, switching to using .empty() provides a significant performance boost when using Angular with jQuery. Closes #4457 --- test/ngAnimate/animateSpec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/ngAnimate/animateSpec.js') diff --git a/test/ngAnimate/animateSpec.js b/test/ngAnimate/animateSpec.js index 44b623b4..01589da1 100644 --- a/test/ngAnimate/animateSpec.js +++ b/test/ngAnimate/animateSpec.js @@ -301,7 +301,7 @@ describe("ngAnimate", function() { inject(function($animate, $compile, $rootScope, $timeout, $sniffer) { $rootScope.$digest(); - element.html(''); + element.empty(); var child1 = $compile('
1
')($rootScope); var child2 = $compile('
2
')($rootScope); -- cgit v1.2.3