mirror of https://github.com/abpframework/abp.git
6 changed files with 18 additions and 21 deletions
@ -1,18 +1,16 @@ |
|||||
import { Component, Input, OnInit, Output, EventEmitter, TrackByFunction } from '@angular/core'; |
import { Component, Input, OnInit, Output, EventEmitter, TrackByFunction } from '@angular/core'; |
||||
|
|
||||
@Component({ |
@Component({ |
||||
selector: 'abp-paginator', |
selector: 'abp-pagination', |
||||
templateUrl: 'paginator.component.html', |
templateUrl: 'pagination.component.html', |
||||
}) |
}) |
||||
export class PaginatorComponent implements OnInit { |
export class PaginationComponent implements OnInit { |
||||
private _value = 1; |
private _value = 1; |
||||
@Input() |
@Input() |
||||
get value(): number { |
get value(): number { |
||||
return this._value; |
return this._value; |
||||
} |
} |
||||
set value(newValue: number) { |
set value(newValue: number) { |
||||
if (newValue < 1 || newValue > this.totalPages || newValue === this._value) return; |
|
||||
|
|
||||
this._value = newValue; |
this._value = newValue; |
||||
this.valueChange.emit(newValue); |
this.valueChange.emit(newValue); |
||||
} |
} |
||||
Loading…
Reference in new issue