当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - AngularJS - Pull down to refresh module not working

问题描述:

I want to implement "pull down to refresh" in Angular. A lot of the JS libraries don't work with Angular, but I found this one:

https://github.com/mgcrea/angular-pull-to-refresh

However, it doesn't work. I see the text "pull down to refresh" on top, so directive is installed properly. But that's it, nothing happens when I scroll down.

var feedApp = angular.module("feedApp", ['mgcrea.pullToRefresh']);

....

<div id="feed-list-content" data-role="content">

<ul class="feed-list" data-role="listview" pull-to-refresh="onReload()">

<li ng-repeat="summaryItem in summaryItems | orderBy: 'created':true" class="feed-item">

....

</li>

</ul>

</div>

Same questions here: Pull to refresh in Angular Js and here: Angular JS - Pull to refresh

but no solution to my problem.

The onReload method is neither called.

I'm testing on both Android Emulator and Android device. Can't test on iOS, is it caused by Android?

分享给朋友:
您可能感兴趣的文章:
随机阅读: