Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default onScrollEnd
- function onScrollEnd() {
- return {
- restrict: 'A',
- link: function (scope, element, attrs) {
- var raw = element[0];
- element.bind('scroll', function () {
- if (raw.scrollTop + raw.offsetHeight == raw.scrollHeight) {
- scope.$apply(attrs.onScrollEnd);
- }
- })
- }
- }
- }
Add Comment
Please, Sign In to add comment