5

Android用のアプリケーションを開発しており、「Ionic Framework」というフレームワークを使用しています。これが、「ion-infinite-scroll」の無限スクロールシステムフレームワークを使用してシステムを作成する必要がある私の問題です。

PC の Chrome でテストを行ったところ、ページ上の位置に関係なく、ion-infinite-scrollが停止しませんでした。

システムが機能するようにコードを配置するにはどうすればよいですか? ありがとう

コントローラ

$scope.loadMore = function(){
    console.log("LoadMOre");



    imageCache.init().then(function() {
        BonjourTwitterRepository.populate($scope);
    });
    $scope.$broadcast('scroll.infiniteScrollComplete');
    $scope.$broadcast('scroll.resize');



    console.log($scope.tweetsList);
    if(false){
        console.log("ok");
        $scope.noMoreItemsAvailable = true;

    }
    $scope.currentIndex = $scope.currentIndex + $scope.perPage;

};

リポジトリ

var populateCollection = function (tweets, $scope) {
    collection = new TweetCollection();
    console.log($scope.currentIndex);
    for (var i = $scope.currentIndex; i < $scope.perPage; i++) {
        collection.addTweets(new Tweet(tweets[i], $scope, imageCache));

    }
    $scope.tweetsList = collection;

};

意見

    <ion-item class="item item-body">
        <div class="item item-image">
            <img ng-src="{{tweet.media_url}}" src="img/loading1.gif"/>
        </div>
        <p>
            by : <a href="https//twitter.com/{{tweet.getUsername()}}">@{{tweet.getUsername()}}</a>
        </p>

    </ion-item>
    <div class="item tabs tabs-secondary tabs-icon-left">
        <p>
            <a href="#" class="rating-poll"><i class="icon-thumbs-up"></i></a>
            <a href="#" class="rating-poll"><i class="icon-thumbs-down"></i></a>
        </p>

        <p>
            <button ng-click="shareThis('{{tweet.media_url}}')" class="button icon button-clear "><i
                    class="icon ion-share"></i>Share
            </button>

        </p>


    </div>
</ion-list>
<ion-infinite-scroll></ion-infinite-scroll>

4

1 に答える 1