I am new to using PrimeNG and I need a confirmation dialog. I read the documentation on the confirmation dialog and implemented it on my component.
my-component.ts
import { ConfirmDialogModule, ConfirmationService } from 'primeng/primeng';
my-component.html
<p-confirmDialog header="Order Confirmation" icon="fa fa-question-circle" width="425" #cd> <p-footer> <button type="button" pButton icon="fa-close" label="No" (click)="cd.reject()"></button> <button type="button" pButton icon="fa-check" label="Yes" (click)="cd.accept()"></button> </p-footer> </p-confirmDialog>
app.module.ts
import { ConfirmDialogModule, ConfirmationService } from 'primeng/primeng'; @NgModule({ declarations: [ ], imports: [ BrowserModule, ConfirmDialogModule, FormsModule, ReactiveFormsModule, HttpModule, AppRoutingModule ], providers: [ConfirmationService], bootstrap: [AppComponent] }) export class AppModule { }
Anything I missed causes an error? Please enlighten me.
angular primeng
Mix austria
source share