Home Bind scroll event is not trigger in angular directive
Reply: 0

Bind scroll event is not trigger in angular directive

user854
1#
user854 Published in May 23, 2018, 10:40 pm

Hello I'm working in angularjs1. I created directive for my app now I need to bind scroll event in that directive. In that directive bind WHEEL event correctly trigger in Desktop but its not worked in mobile or tablet, so I go with scroll bind. But it doesn't work even Desktop
wheel

 link: function (scope, element, attrs) {
element.bind('wheel', function (e) {
    console.log("scrolling..."); //its work in Desktop
});
})   

scroll

link: function (scope, element, attrs) {
element.bind('scroll', function (e) {
    console.log("scrolling..."); //its not work 
});
}) 

How can I handle it, and then ng - click scroll top also not working.if there I need to initialize something for scroll event

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.252159 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO