Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Ionic 2 InfiniteScroll not working

$
0
0

@Vikrana81 wrote:

I am trying to get InfiniteScroll to work for Ionic beta. It does not show up at all at the bottom of the list...What am I doing wrong? Here is my Ionic code..thanks in advance.

package.json

{
  "dependencies": {
    "angular2": "^2.0.0-beta.6",
    "angular2-moment": "^0.3.0",
    "es6-promise": "3.0.2",
    "es6-shim": "0.33.13",
    "firebase": "^2.4.0",
    "ionic-framework": "^2.0.0-beta.0",
    "ionicons": "3.0.0-alpha.3",
    "moment": "^2.11.1",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.0",
    "zone.js": "0.5.14"
  },
  "devDependencies": {
    "awesome-typescript-loader": "^0.15.9",
    "strip-sourcemap-loader": "0.0.1",
    "typescript": "^1.7.5"
  },
  "name": "bogoshogo",
  "description": "BogoShogo: An Ionic project",
  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard",
    "cordova-plugin-camera",
    "cordova-plugin-file",
    "phonegap-plugin-push"
  ],
  "cordovaPlatforms": [
    {
      "platform": "android",
      "locator": "browser"
    },
    "ios"
  ]
}

Ionic Info:
Cordova CLI: 6.0.0
Ionic Version: 2.0.0-beta.1
Ionic CLI Version: 2.0.0-beta.19
Ionic App Lib Version: 2.0.0-beta.9
ios-deploy version: 1.8.5
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.5.0
Xcode version: Xcode 7.2.1 Build version 7C1002

constructor(private platform:Platform, private nav:NavController) {
        this.isAndroid = platform.is('android');
        //ion-infinitescroll code
        this.items = [];
        for (var i = 0; i < 30; i++) {
            this.items.push( this.items.length );
        }

    }
doInfinite(infiniteScroll) {
        console.log('Begin async operation');

        setTimeout(() => {
            for (var i = 0; i < 30; i++) {
                this.items.push( this.items.length );
            }

            console.log('Async operation has ended');
            infiniteScroll.complete();
        }, 500);
    }

**opening are there I am just removing them as they gets rendered in the page.

<ion-content>
ion-infinite-scroll (infinite)="doInfinite($event)">
        <ion-infinite-scroll-content
                loadingSpinner="bubbles"
                loadingText="Loading more data...">
        </ion-infinite-scroll-content>
    /ion-infinite-scroll>
</ion-content>

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>