import {Component, Input, Output, EventEmitter} from '@angular/core';
import {Observable} from 'rxjs';
import {ErrorCodes} from '../../utils/properties/errorCodes';
@Component({
selector: 'no-load-paging',
template: `
{{totalResults | number}}
{{type}}, page
{{page}}
of
{{paging.getTotalPages()}}
`
})
export class NoLoadPagingComponent {
@Input() type: string;
@Input() page: number = 1;
@Input() pageSize: number = 10;
@Input() totalResults: number;
@Output() pageChange: EventEmitter = new EventEmitter();
public updatePage(event) {
this.pageChange.emit({
value: event.value
});
}
}