ion-spinner only works once, how to correct this?

0

Scenery:

The <ion-spinner> directive is used on screen A, but when it is used on the next screen, screen B, a problem occurs, where it appears but does not have the animation.

Has anyone ever had this problem, and was able to fix it?

    
asked by anonymous 19.01.2016 / 20:21

2 answers

1

I've had problems with spinner when I was using the old version of Ionic. Take a look at the ionic / version.json file and see which version you are using. Check the link site if you are even with a current version.

    
16.02.2016 / 15:15
-1

//We need to let the ion-infinite-scroll know that we’re done loading in the new items. 
//To do this, we need to broadcast the scroll.infiniteScrollComplete event.
$scope.$broadcast('scroll.infiniteScrollComplete');

Just add this line when your function returns the values in the list. example:

var successCallback = function(data){
  $scope.list = $scope.list.concat(data);
  $scope.$broadcast('scroll.infiniteScrollComplete');
});
    
07.03.2016 / 14:49