<ion-spinner> only works once, how to correct it?

Asked

Viewed 80 times

0

Setting:

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

Someone has already been through this problem, and managed to fix?

2 answers

1

I had problems with spinner when I was using old version of Ionic. Take a look at the Ionic/version.json file and see what version you’re using. Check on the website http://code.ionicframework.com/# if you are even with a current version.

  • Thanks @Andrévicente, but I’m using version 1.2.4 (Copenhagen). :/

-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 list values. example:

var successCallback = function(data){
  $scope.list = $scope.list.concat(data);
  $scope.$broadcast('scroll.infiniteScrollComplete');
});

Browser other questions tagged

You are not signed in. Login or sign up in order to post.