angular - p-footer 不是 p-dialog 中的已知元素错误
问题描述
在 HTML 中
<p-dialog [resizable]="false" header="Softcopy Acceptance for Ledger and
Invoice" [(visible)]="!displaySoftCopyDialog"
[responsive]="true" showEffect="fade" [modal]="true" [width]="600">
<p style="margin: 5px; height: 305px"><span>
<span style="color:red;">GO GREEN</span><br>
Season’s Greetings! <br>
copy, they may consciously opt for the Hardcopy option.<br><br>
We wish for your consent to join us in this drive by opting for monthly
bills through E-bill only.
</span></p>
<p-footer>
<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
<button type="submit" class="btn btn_searchSmall_add"
(click)="remindSoftCopy()">Remind Later</button>
<button type="submit" class="btn btn_searchSmall_add"
(click)="acceptSoftCopy()">Accept</button>
</div>
</p-footer>
</p-dialog>
在 ts 文件中,我从primeng设置了这两个
DialogModule,
SharedModule
在模块中,我也从primeng设置了这两个
DialogModule,
SharedModule
为什么会这样
解决方案
您在 package.json 文件中使用的是什么版本的 Prime NG?较旧的库 (1. . ) 不支持 p-footer 和 p-header,它从版本 2 开始包含在内。
推荐阅读
- sql - SQL 连接数据并获取与 NULL 不匹配的行
- go - Terraform 提供者应该如何处理在服务器端应用的默认值?
- javascript - 使用 JavaScript 连接 2 个具有不同主键的 JSON 对象
- python - gridsearchcv 中的 refit 选项是否会重新选择功能?
- rabbitmq - 将微服务与事件同步 (RabbitMQ)
- arrays - 如何处理 BehaviorSubjects、Observables 中的嵌套数组/对象?
- java - 断言 - 内部调用问题
- laravel - 如何在 Laravel 5.6 中设计我的分页表单并对其进行控制?换句话说,如何使用 Paginator Instance Method?s
- sql-server - 为什么当 SQL Server 设置为强制加密时 SSMS 允许登录,并且 SSMS 登录选项中未选择“加密连接”选项
- jquery - 如何根据 JQuery 中的特定条件在循环内禁用 TextInputs?