34 lines
881 B
TypeScript
34 lines
881 B
TypeScript
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
|
import {Router, ROUTER_DIRECTIVES} from '@angular/router-deprecated';
|
|
|
|
|
|
@Component({
|
|
selector: 'tabPaging',
|
|
template: `
|
|
<div class="panel panel-default" *ngIf="!showAll && length > 10">
|
|
<div class="panel-heading">
|
|
<a (click)="changeShowAll.emit({value: true});">
|
|
<div class="text-right">view all {{length}}</div>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
`
|
|
,
|
|
directives: [
|
|
...ROUTER_DIRECTIVES
|
|
]
|
|
})
|
|
|
|
export class TabPagingComponent {
|
|
@Input() showAll: boolean;
|
|
@Input() length: number;
|
|
@Output() changeShowAll: EventEmitter<any> = new EventEmitter();
|
|
|
|
constructor (private _router: Router) {
|
|
console.info('publication:paging constructor');
|
|
}
|
|
|
|
ngOnInit() {
|
|
}
|
|
}
|