PrimeNG button not displaying fa icon and label in angular2

Viewed 17308

I want to display Add and Delete button in the panel header. Below code displays button with no fa-icon and no label

<p-panel>
  <p-header>
   <div>
     Registration Form
     <button type="button" pButton icon="fa-plus" style="float:right" label="Add">
     </button>
   </div>
  </p-header>
</p-panel>
6 Answers

Changing from pi-close to fa-close worked for me.

Seems that there are new and old font awesome icons. They have to be used like this:

class="pi pi-xxx" or class="fa fa-xxx"

You cannot use icon and label at the same time.Try below <button type="button" pButton icon="fa-plus" style="float:right"></button> and importing ButtonModule from primeng/button is a must

Related