2017-02-08 16 views
0


我有內側的東西簡單的div:

<div>...</div> 

和例如範圍:

$scope.test = false; 

有沒有一種簡單的方法來改變這個$範圍爲真,當我在div上滾動?

+0

你已經採取了看看? http://stackoverflow.com/questions/14878761/bind-class-toggle-to-window-scroll-event – laser

回答

0
 angular.element('div').bind('scroll', function() { 
      $scope.test = true; 
     }); 

可能是你可以試一下,只要綁定事件到你想要的DIV和$ scope.test設置爲true時,在該事件發生

相關問題