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