d
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user