-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with InfiniteScroll on v1.0.0-beta.12 #2335
Comments
Hey @trubbuzjo - the
So in your example you could have two variables - Let me know if that fixes your problem :) |
Hello, the problem was just the condition of the end loading on the InfiniteScroll directive. Thanks for reply. |
Ahh, got it. Ripple is awesome, but it seems there are quite a few bugs that need to be worked out still. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
HI, I'm working with the version of ionic "1.0.0-beta.12 Krypton Koala (09/10/2014)" and I have a problem with the infinite scroll.
the problem is that when I call the fetch () function in the service, it generates an infinite loop, as if the event "scroll.infiniteScrollComplete" would not be called.
I tried not to use the infiniteScroll and my data is well displayed. (http://codepen.io/calendee/pen/pzJLl)
I also tried to run various examples found here (airlines, etc.), but always with the same result, the fetch() function generates an infinite loop.
My code is:
HTML
Controller:
.controller('ListUsersCtrl', function ($scope, $q, $http, $timeout, DataService) {
$scope.limit = 5;
$scope.title = "Users";
$scope.MoreItemAvailable = true;
$scope.users = []
$scope.fetchUsers = function(){
DataService.fetchUsers().then(function(data){
$scope.users = data;
console.log($scope.users)
$scope.$broadcast('scroll.infiniteScrollComplete');
})
}
$scope.fetchUsers()
})
Service:
.factory('DataService', ['$http', '$q', '$timeout', function ($http, $q, $timeout) {
var fetchUsers = function () {
var start = requestCounter * requestLimit;
var users = $http.get("data/users.json").success(function(data){
users = data
}).error(function(error){
console.log(error)
})
return users
}
}
return{
fetchUsers: fetchUsers
};
}
thank you
The text was updated successfully, but these errors were encountered: