ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: [ionic: 1.0.0-beta.14] ion-infinite-scroll: view never update

Open blacksmith77 opened this issue 11 years ago • 1 comments

Type: bug

Platform: desktop browser

ion-infinite-scroll fires function to update model but never update view. $scope.$broadcast('scroll.infiniteScrollComplete'); seems to never be fired.

ionic version: gitpulled today with npm install -g ionic

OS: Windows XP
Node Version: v0.10.35
Cordova CLI: 4.2.0
Ionic Version: 1.0.0-beta.14
Ionic CLI Version: 1.3.2

project created with ionic start myAppBlank blank

This in my test code:

FILE: index.html

 <ion-content ng-controller="ContentController">
  <ion-refresher pulling-text="Pull to refresh..." on-refresh="doRefresh()"></ion-refresher>

    <ion-list>
      <ion-item ng-repeat="item in items">
        {{item}}
      </ion-item>
    </ion-list>

    <ion-infinite-scroll on-infinite="loadMore()" ></ion-infinite-scroll>

</ion-content>

FILE: app.js app.controller('ContentController', function($scope){

if( !$scope.items )
    $scope.items = ['init Post 1', 'init Post 2', 'init Post 3', 'init Post 4', 'init Post 5' ];

$scope.doRefresh = function() {
    // [..] ... this is working weel
};

$scope.loadMore = function() {
    $scope.items.push('Loaded POST (' + ($scope.items.length + 1) + ') by IS');
    $scope.$broadcast('scroll.infiniteScrollComplete');
    console.log( 'loadMore(): ' + $scope.items.length );
};


$scope.$on('$stateChangeSuccess', function() {
    console.log( 'STATE CHANGED!' );  // this is never reached!!!
});

 });

Thanks in advance

blacksmith77 avatar Jan 18 '15 16:01 blacksmith77

element work well in nightly version. Closing issue.

blacksmith77 avatar Jan 30 '15 10:01 blacksmith77