primeng数据表中的自定义加载图标

时间:2017-10-07 09:54:04

标签: angular primeng

在我的angular 4项目中,我有一些primeng数据表,我想在加载表时使用自定义加载图标。 但我不知道如何在项目中使用自定义图标,我从loading.io下载了图标,我需要css版本还是svg版本?

在Primeng中,我看到有这个默认图标enter image description here 我怎么能像这样放我的?

1 个答案:

答案 0 :(得分:1)

http://fontawesome.io/icons/

中查找要显示的图标

示例:fa-spinner是以下图标http://fontawesome.io/icon/spinner/

的css类

在模板中,添加loadingIcon属性:

<p-dataTable [value]="values" [loadingIcon]="fa-spinner">
    ...
</p-dataTable>