# Problem with ionic infinite scrolloing

**URL:** <https://forum.ionicframework.com/t/problem-with-ionic-infinite-scrolloing/12472>\
**Category:** ionic-v1\
**Created:** [November 11, 2014, 12:06am UTC](https://forum.ionicframework.com/t/problem-with-ionic-infinite-scrolloing/12472 "2014-11-11T00:06:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cmaden](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/cmaden/32/8950_2.png) [@Cmaden](https://forum.ionicframework.com/u/Cmaden)\
**Post date:** [November 11, 2014, 12:06am UTC](https://forum.ionicframework.com/t/problem-with-ionic-infinite-scrolloing/12472/1 "2014-11-11T00:06:13Z")

</div>

code in controller:

```
$scope.limit = 1;
    	$scope.loadMore = function() {
    		$scope.limit +=1
      	  	console.log($scope.limit)
    	    if ( $scope.maanta.length <$scope.limit) {
    	      $scope.noMoreItemsAvailable = true;
    	    }
    	    $scope.$broadcast('scroll.infiniteScrollComplete');
    	  };

```

code in after :

```
<ion-infinite-scroll ng-if="!noMoreItemsAvailable" on-infinite="loadMore()" distance="1%"></ion-infinite-scroll>

```

the problem am having is unless i navigate away from the tab to another tab and come back the infinite scrolling doesn’t work.

When i navigate away to another tab and come back to the tab the code works as expected.

I am change the limit on the ng-repeat with infinite scrolling any help ?
