Skip to content Skip to sidebar Skip to footer

Ionic Spinner Not Showing Up

I fill a Ionic collection-repeat list with a http-request, but I don't want to load everything directly into the DOM. So I'm only displaying a few of the items and add the rest of

Solution 1:

Unfortunately it's not solve yet. There are share one more problem with infinite-scrolling

https://forum.ionicframework.com/t/infinite-scrolling-and-collection-repeat-spinner-not-shown/14358

Solution 2:

Try this snippet it works...

//css
.my-spinner{
z-index: 99999999 !important;
position: absolute;
bottom:0px;
left:45%;
right:45%;
}


//template
<ion-infinite-scroll
    ng-if="!noMoreItemsAvailable"
    icon="ion-load-d"
    on-infinite="getpagenation()"
    distance="1%">
  </ion-infinite-scroll>

<div  ng-if="!noMoreItemsAvailable">
      <ion-spinner ng-show="ItemLoading" icon="ios" class="spinner spinner-ios my-spinner">
</div>



//js
$scope.getpagenation = function() {
        $scope.ItemLoading = true;
 //you can call services

 //have items
        $scope.ItemLoading = false;
 //no more items
        $scope.noMoreItemsAvailable = true;
        $scope.ItemLoading = false;
        $scope.$broadcast('scroll.infiniteScrollComplete');
} 

Post a Comment for "Ionic Spinner Not Showing Up"