This commit is contained in:
programmingPug
2018-04-12 23:29:22 -04:00
parent 2e1a7f06d3
commit abfe4ee830
3 changed files with 17 additions and 1 deletions

View File

@@ -23,7 +23,9 @@ export class GameGridComponent implements OnInit {
queryFilters = "";
querryPage = 1;
queryOrder = "Title";
queryRecordMax = 10;
queryRecordMax = 9;
queryMaxPages = 0;
index = 0;
showNext = true;
showBack = false;
@@ -45,6 +47,9 @@ export class GameGridComponent implements OnInit {
this.gameListSubscription = this.gamesService.getGames( this.queryFilters, this.querryPage, this.queryOrder, this.queryRecordMax ).subscribe( data => {
this.gamesData = data.games;
this.queryMaxPages = Math.round( data._results / this.queryRecordMax );
console.log( this.queryMaxPages );
if( this.gamesData.length < this.queryRecordMax ){
this.showNext = false;
}else{