Closed MartyBolton closed 8 years ago
So, maybe this can help you. I think iscroll={options} is the best place for event handlers.
Js:
app.controller('MainCtrl', function () {
this.PullDownRefresh = function () {};
});
Html:
<div ng-controller="MainCtrl as vm">
<div class="iscroll-wrapper" iscroll="{ onScrollEnd: vm.PullDownRefresh}"
<div class="iscroll-scroller">
</div>
Thanks! I did get it to work in configuration, but I wanted to use it as you posted local to controller thanks again!
Thank you so much for handling this issue, @DarthBender.
Can you show me a small example of hooking in to the onScrollEnd event using angular? I see the javascript examples but I'm using you example. I'm missing something basic. I was hoping to specify in html using iscroll={options} or $scope.instance.on('event') but that does not seem to be the right approach.
Update: I was able to hook into it with the global configuration option. I'm wondering if I can access it from my instance directly or would you recommend I broadcast an event from my configuration. Ultimately - trying to implement an easy to use PullDownRefresh() for mobile anywhere I need it.
thanks - awesome wrapper!