pages + refactor

This commit is contained in:
2021-10-04 16:57:29 +02:00
parent 5004678f2b
commit c538200ea9
28 changed files with 439 additions and 91 deletions
+4 -5
View File
@@ -1,4 +1,4 @@
import { Component, OnInit, Input } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
@@ -11,8 +11,7 @@ import { PageEvent } from '@angular/material/paginator';
})
export class PageTop implements OnInit {
@Input() entries: any;
entries: any;
boundRefresh: Function;
boundUpdate: Function;
init: boolean = true;
@@ -48,7 +47,7 @@ export class PageTop implements OnInit {
}
this.entries.content = null;
this.entriesService.getPages(this.entries.number || 0, this.entries.size || 30).subscribe((data: any) => {
this.entriesService.getRanked(this.entries.number || 0, this.entries.size || 30).subscribe((data: any) => {
this.entries = data;
}, (error) => { })
@@ -74,7 +73,7 @@ export class PageTop implements OnInit {
queryParamsHandling: 'merge'
});
this.entriesService.getPages(event.pageIndex, event.pageSize).subscribe((data: any) => {
this.entriesService.getRanked(event.pageIndex, event.pageSize).subscribe((data: any) => {
this.entries = data;
}, (error) => { })
}