mp-common
Version:
This is XPO MarketPlace common libary
34 lines (30 loc) • 1.08 kB
text/typescript
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core'
import { DEFAULT_TEMPLATE, DEFAULT_STYLES } from './template';
({
selector: 'pagination-controls',
template: DEFAULT_TEMPLATE,
styles: [ DEFAULT_STYLES ],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None
})
export class PaginationControlsComponent {
() id: string;
() maxSize: number = 7;
()
get directionLinks(): boolean {
return this._directionLinks;
}
set directionLinks(value: boolean) {
this._directionLinks = !!value && <any>value !== 'false';
}
()
get autoHide(): boolean {
return this._autoHide;
}
set autoHide(value: boolean) {
this._autoHide = !!value && <any>value !== 'false';
}
() pageChange: EventEmitter<number> = new EventEmitter<number>();
private _directionLinks: boolean = true;
private _autoHide: boolean = false;
}