【发布时间】:2017-04-18 11:39:29
【问题描述】:
我只需要 window.location.reload() 用于特定元素。
具体来说,我有一个包含许多列的表。
<p-dataTable #tableRef class="invoice-datatable"></p-dataTable>
当我点击下面的图片时,我调用了 refreshTable 方法,我只需要它来刷新数据表。
`<img role="button" id="refresh-icon" src="/assets/img/refresh.png (click)="refreshTable(tableRef)">
【问题讨论】:
-
如果用
<p-dataTable [value]="myModel">之类的东西把模型绑定到表上,模型变化时表不会刷新吗? -
可以。但是如何通过点击图片来实现呢?
标签: javascript angular datatable primeng