小编Arr*_*rri的帖子

如何在AngularJS指令中绑定元素上的scroll事件

如何在AngularJS指令中绑定元素上的scroll事件?

我绑定$ window上的滚动,但现在我需要将它更改为此类".body-wrapper"(angular.element(document.queryselector(.body-wrapper))不起作用).

有任何想法吗 ?

angular.element($window).bind("scroll", function () { 
   ...
})
Run Code Online (Sandbox Code Playgroud)

javascript scroll bind angularjs

9
推荐指数
2
解决办法
4万
查看次数

标签 统计

angularjs ×1

bind ×1

javascript ×1

scroll ×1