Hi Vern,
You can attach as many scroll events as you like. See this example if you
don't believe me:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<style>
#container {
position: absolute;
height: auto;
top: 0;
bottom: 0;
width: auto;
left: 0;
right: 0;
overflow: auto;
}
#foo {
height:1000px;
width:1000px;
background-color: #777;
display: block;
}
</style>
</head>
<body>
<div id="container">
<div id="foo"></div>
</div>
<script type="text/javascript">
var container = document.getElementById('container')
container.addEventListener('scroll', () => console.log('ev1'))
container.addEventListener('scroll', () => console.log('ev2'))
container.addEventListener('scroll', () => console.log('ev3'))
</script>
</body>
</html>
Of course there are performance penalties if you add to much processing on
the scroll handler. You should at least debounce it.
As you are using NG2, you can easily bind to this event by using something
like this:
<div (scroll)='myScrollHandler'></div>
Does this help you a bit?
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.