英文:
Error message when displaying PrimeNG Galleria component
问题
我最近升级了我的Angular应用到版本16,所以我也升级了我的PrimeNg组件。我目前正在使用版本16.0.0-rc.2(唯一一个可以安装在Angular 16上的版本),我遇到了以下错误消息,并且组件无法正常工作:
这个错误是由以下代码生成的:
<p-galleria [value]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5">
<ng-template pTemplate="item" let-item>
<img [src]="item.itemImageSrc" style="width:490px; height: 480px;" />
</ng-template>
<ng-template pTemplate="thumbnail" let-item>
<div class="grid grid-nogutter justify-content-center">
<img [src]="item.thumbnailImageSrc" style="width:80px; height: 60px;" />
</div>
</ng-template>
</p-galleria>
如果我注释掉这个HTML元素,错误就消失了。
感谢任何关于如何解决这个问题的建议。
英文:
I recently upgraded my angular app to version 16 so I also upgraded my PrimeNg components. I am currently using version 16.0.0-rc.2 ( the only version that would install on angular 16) and I am running in the following error message and the component does not work:
It is generated by this:
<p-galleria [value]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5">
<ng-template pTemplate="item" let-item>
<img [src]="item.itemImageSrc" style="width:490px; height: 480px;" />
</ng-template>
<ng-template pTemplate="thumbnail" let-item>
<div class="grid grid-nogutter justify-content-center">
<img [src]="item.thumbnailImageSrc" style="width:80px; height: 60px;" />
</div>
</ng-template>
</p-galleria>
If I comment out the html element, the error goes away.
Thanks for any suggestion on how to address this issue.
答案1
得分: 0
我遇到了与primeng 16.0.0相同的问题,升级到primeng 16.0.1后,问题消失了。
英文:
I had the same problem with primeng 16.0.0, and after upgrading to primeng 16.0.1, the problem disappeared.
答案2
得分: 0
我遇到了与p-galleria相同的问题。只需将primeNg版本从"primeng": "^16.0.0-rc.2"
更新到"primeng": "^16.0.1"
,这个问题就消失了。
英文:
I had same problem with p-galleria. Just update primeNg version "primeng": "^16.0.0-rc.2" to "primeng": "^16.0.1"
, this problem disappeared.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论