0
我使用角度为2的材料设计。我想为我的应用程序使用材料设计分页器,并获取组件中当前选定的页面索引。没有了分页程序plugin.here多文档材料分页程序页面:https://material.angular.io/components/paginator/overviewangular 2材料paginator获取当前页面索引
HTML代码
<md-paginator [length]="100"
[pageSize]="10"
[pageSizeOptions]="[5, 10, 25, 100]">
</md-paginator>
角2码
@Component({
selector: 'paginator-overview-example',
templateUrl: 'paginator-overview-example.html',
})
export class PaginatorOverviewExample {
//I want to get page change event here
}
,因为我在他的API https://material.angular.io/components/paginator/api看到,有页面索引 –
的@Output我怎么能实现呢?如何在paginator中获得更改事件? –
看看他的例子“pageEvent”是使用https://material.angular.io/components/paginator/examples –