Listen to famous-angular scroll view

送分小仙女□ 提交于 2019-12-11 06:54:41

问题


Is there a way to listen to a famous-angular's fa-scroll-view for scroll events on touch devices?

For example, right out of the famous-angular docs:

<fa-app ng-controller="ScrollCtrl">
  <!-- fa-scroll-view receives all events from $scope.myEventHandler, and decides how to handle them -->
  <fa-scroll-view fa-pipe-from="myEventHandler">
      <fa-view ng-repeat="view in views">
        <fa-modifier fa-size="[undefined, 160]">
        <!-- All events on fa-surfaces (click, mousewheel) are piped to $scope.myEventHandler -->
           <fa-surface fa-background-color="view.color"
                        fa-pipe-to="myEventHandler">
           </fa-surface>
          </fa-modifier>
      </fa-view>
  </fa-scroll-view>
</fa-app>

I can listen to clicks on myEventHandler with

$scope.myEventHandler.on('click', ...)

but not scroll:

$scope.myEventHandler.on('scroll', ...) // doesn't fire

Is this possible?

Thanks.


回答1:


$famous.find('fa-scroll-view')[0].renderNode.sync.on('start', function(event) { console.log('start'); }); Also has 'update' and 'end' events



来源:https://stackoverflow.com/questions/25924752/listen-to-famous-angular-scroll-view

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!