Skip to content

Commit 3186567

Browse files
committed
remove padding templates
1 parent f35780e commit 3186567

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)