Infinty Scroll und CSS angepasst

This commit is contained in:
Hilmer, Carsten
2016-08-24 15:37:24 +02:00
parent a3b9c29577
commit 8d2aa126a3
8 changed files with 122 additions and 109 deletions

View File

@@ -41,6 +41,7 @@ appControllers.controller('contractListCtrl', function ($scope, $stateParams,$fi
jQuery('#contract-list-loading-progress').fadeIn(700);
}
}, 400);
$timeout(function () {
//Get all contracts.
@@ -53,6 +54,13 @@ appControllers.controller('contractListCtrl', function ($scope, $stateParams,$fi
};// End initialForm.
$scope.numberOfItemsToDisplay = 20; // Use it with limit to in ng-repeat
$scope.addMoreItem = function(done) {
if ($scope.pokemons.length > $scope.numberOfItemsToDisplay)
$scope.numberOfItemsToDisplay += 20; // load number of more items
$scope.$broadcast('scroll.infiniteScrollComplete')
}
// getPokemonList is for get all contracts.
// By calling pokedexDB.all() service.
$scope.getPokemonList = function () {

View File

@@ -59,7 +59,7 @@ appServices.factory('pokedexDB', function ($cordovaSQLite)
}
});
// Variable for prepare query statement to select all contracts.
var query = "SELECT * FROM tblPokemon order by POKEDEXID ASC";
var query = "SELECT * FROM tblPokemon";
// Execute query statement from query variable.
$cordovaSQLite.execute(db, query).then(function (res)