This commit is contained in:
2018-04-18 17:03:35 -04:00
4 changed files with 51 additions and 0 deletions

View File

@@ -22,10 +22,16 @@ export class GameGridComponent implements OnInit {
queryFilters = "";
querryPage = 1;
queryOrder = "Title";
<<<<<<< HEAD
length = 100;
pageSize = 10;
pageSizeOptions = [5, 10, 25, 50, 100];
=======
queryRecordMax = 9;
queryMaxPages = 0;
index = 0;
>>>>>>> abfe4ee830cfae95721bac32b34103b2538680eb
constructor(
@@ -45,6 +51,24 @@ export class GameGridComponent implements OnInit {
this.gameListSubscription = this.gamesService.getGames( this.queryFilters, this.querryPage, this.queryOrder, this.pageSize ).subscribe( data => {
this.length = data["_results"];
this.gamesData = data.games;
<<<<<<< HEAD
=======
this.queryMaxPages = Math.round( data._results / this.queryRecordMax );
console.log( this.queryMaxPages );
if( this.gamesData.length < this.queryRecordMax ){
this.showNext = false;
}else{
this.showNext = true;
}
if( this.querryPage != 1 ){
this.showBack = true;
}else{
this.showBack = false;
}
>>>>>>> abfe4ee830cfae95721bac32b34103b2538680eb
});
}