要解决"angular - primeng - confirmdialog不工作"的问题,可以按照以下步骤进行:
确保你的项目中已经正确安装了Angular和PrimeNG,并且依赖项已经正确配置。
在你的组件文件中导入所需的模块和服务,例如:
import { ConfirmationService } from 'primeng/api';
constructor(private confirmationService: ConfirmationService) { }
this.confirmationService.confirm({
    message: 'Are you sure you want to delete this item?',
    header: 'Confirmation',
    icon: 'pi pi-exclamation-triangle',
    accept: () => {
        // 确认操作
    },
    reject: () => {
        // 取消操作
    }
});
confirm() {
    this.confirmationService.confirm({
        message: 'Are you sure you want to delete this item?',
        header: 'Confirmation',
        icon: 'pi pi-exclamation-triangle',
        accept: () => {
            // 确认操作
        },
        reject: () => {
            // 取消操作
        }
    });
}
通过按照以上步骤检查和配置,应该能够解决"angular - primeng - confirmdialog不工作"的问题,并且能够成功显示和处理确认对话框。