Files
bstlboard-front/src/app/pages/user/userentries/userentries.page.ts
T

29 lines
758 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { EntriesService } from '../../../services/entries.service';
@Component({
standalone: false,
selector: 'page-userentries',
templateUrl: './userentries.page.html'
})
export class PageUserEntries implements OnInit {
username: string;
boundFetch: Function;
constructor(private entriesService: EntriesService, private route: ActivatedRoute) { }
ngOnInit(): void {
this.username = this.route.snapshot.paramMap.get('username');
this.boundFetch = this.fetch.bind(this);
}
fetch(page: number, size: number, asc: boolean, filter: any) {
return this.entriesService.getByUser(this.username, page, size, asc, filter);
}
}