Ionic infinite scroll not working proper

hi i am new in ionic i am using ionic infinite scroll its working but not proper.if i have 50 records then first it show all the product after that we scroll its load same 50 products again i dont know how to add limit there or any type is my code

.controller(‘HomeCtrl’, function($scope, $stateParams,$http,$ionicLoading) {

$scope.latests = [];

$scope.loadMore = function(){

var parameters = {
	id: $scope.lastproductID

 $http.get('',{ params : parameters }).success(function(items) {
  $scope.lastproductID = $;