Problem with ionic infinite scrolloing


code in controller:

$scope.limit = 1;
    	$scope.loadMore = function() {
    		$scope.limit +=1
    	    if ( $scope.maanta.length <$scope.limit) {
    	      $scope.noMoreItemsAvailable = true;

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 ?