听著名棱角滚动视图(Listen to famous-angular scroll view)

2019-10-21 00:12发布

是否有听的方式出名棱角的FA-滚动视图用于在触摸设备上滚动事件?

例如,右出著名的角向文档的:

<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>

我可以听上点击 myEventHandler

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

但不是滚动

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

这可能吗?

谢谢。

Answer 1:

$ famous.find( 'FA-滚动视图')[0] .renderNode.sync.on( '开始',功能(事件){的console.log( '开始');}); 同时还具有“更新”和“结束”事件



文章来源: Listen to famous-angular scroll view