Infinty Scroll und CSS angepasst
This commit is contained in:
@@ -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 () {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user