Skip to content

Commit 79f2455

Browse files
committed
Merge pull request #53 from aantipov/remove-padding-templates
remove padding template
2 parents c8ead70 + 3186567 commit 79f2455

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui-scroll.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,8 @@ angular.module('ui.scroll', [])
553553
viewport.createPaddingElements(template[0]);
554554
// Destroy template's scope to remove any watchers on it.
555555
scope.$destroy();
556-
// also remove the template when the directive scope is destroyed
557-
$scope.$on('$destroy', () => template.remove());
556+
// We don't need template anymore.
557+
template.remove();
558558
});
559559

560560
adapter.reload = reload;

0 commit comments

Comments
 (0)