java - 为什么 html 文件中的 modal="true" 无法使用 PrimeNG 在 jhipster 中编译?
问题描述
我已经生成了一个 jhipster 应用程序,并使用 yo jhipster-primeng 将 PrimeNG 添加到其中。一切正常。但是当我想使用 ./mvnw 运行应用程序时,我在 PrimeNG .html 文件中收到以下错误。如下日志所示,错误表示,类型字符串不可分配给布尔类型。如果我们再往下看,错误来自禁用 =“true”的 .html 文件。在普通的 .html 文件中,这没有问题。为什么在这个 jhipster 应用程序中,它变成了一个错误?有没有人有任何线索。有没有办法或设置来忽略这种错误?
此致,
阿尔文。
注意:我的jhipster版本是6.10.1 generator-jhipster-primeng是9.1.0 java版本是11.0.6
[INFO] ERROR Failed to compile with 165 errors10:28:21 PM
[INFO]
[INFO] error
[INFO]
[INFO] src/main/webapp/app/primeng/buttons/splitbutton/splitbuttondemo.component.html:30:78 - error TS2322: Type 'string' is not assignable to type 'boolean'.
[INFO]
[INFO] 30 <p-splitButton label="Create" icon="fa fa-check" [model]="items" disabled="true"></p-splitButton>
[INFO] ~~~~~~~~~~~~~~~
[INFO]
[INFO] src/main/webapp/app/primeng/buttons/splitbutton/splitbuttondemo.component.ts:6:18
[INFO] 6 templateUrl: './splitbuttondemo.component.html',
[INFO] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[INFO] Error occurs in the template of component SplitbuttonDemoComponent.
[INFO] src/main/webapp/app/primeng/overlay/dialog/dialogdemo.component.html:16:44 - error TS2322: Type 'string' is not assignable to type 'boolean'.
[INFO]
[INFO] 16 <p-dialog [(visible)]="custom" modal="true">
[INFO] ~~~~~~~~~~~~
[INFO]
[INFO] src/main/webapp/app/primeng/overlay/dialog/dialogdemo.component.ts:6:18
[INFO] 6 templateUrl: './dialogdemo.component.html',
[INFO] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[INFO] Error occurs in the template of component DialogDemoComponent.
[INFO] src/main/webapp/app/primeng/overlay/dialog/dialogdemo.component.html:33:63 - error TS2322: Type 'string' is not assignable to type 'boolean'.
[INFO]
[INFO] 33 <p-dialog header="PrimeNG" [(visible)]="advanced" modal="true" [style]="{width: '50vw'}" responsive="true" closable="true" dismissableMask="true" rtl="true">
[INFO] ~~~~~~~~~~~~
[INFO]
[INFO] src/main/webapp/app/primeng/overlay/dialog/dialogdemo.component.ts:6:18
[INFO] 6 templateUrl: './dialogdemo.component.html',
[INFO] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[INFO] Error occurs in the template of component DialogDemoComponent.
[INFO] src/main/webapp/app/primeng/overlay/dialog/dialogdemo.component.html:33:102 - error TS2322: Type 'string' is not assignable to type 'boolean'.
[INFO]
[INFO] 33 <p-dialog header="PrimeNG" [(visible)]="advanced" modal="true" [style]="{width: '50vw'}" responsive="true" closable="true" dismissableMask="true" rtl="true">
[INFO] ~~~~~~~~~~~~~~~~~
[INFO]
解决方案
推荐阅读
- python - 如何在没有当前 idx 的情况下获取数组的随机索引?
- reactjs - 如何在 React JS 中将 const 的值从一个 .js 文件传递到另一个文件?
- python - 代码执行后进入调试模式 Pycharm
- firebase - Flutter - Firestore 菜单功能
- javascript - 单击该行中的按钮时隐藏表格行
- c# - 拖动时显示带有鼠标光标的图像缩略图
- flutter - 颤振列表有时是空的
- java - flink 1.8.2 中未删除 testHarness 计时器
- karate - -Dkarate.options="--tags @xyz" 是否适用于空手道中的并行跑步者(JUnit 5)
- azure - 部署在 Azure 应用服务端点上的自定义身份服务器 4 通过 Azure API 管理公开