PrimeNG button not displaying fa icon and label in angular2
if you are working with angular2/4 you'll need to add the following import to your app.module.ts
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
After importing the BrowserAnimationsModule , primeng Buttons are displaying inside the panel.
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
Your code is working fine here.
Have you imported font-awesome
to your application? If not, add this in your index.html
within the <head></head>
tag.
<head>
...
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
</head>
Also, you will need to import ButtonModule, PanelModule
to your application.
import {ButtonModule, PanelModule} from 'primeng';
@NgModule({
imports: [
...
ButtonModule,
PanelModule,
...
],
...
})