Primeng-列表框:未选择项目
I copied the code in:
primeng-listbox
But with my primeng version (8.0.2) when I click on an item, it is not selected.
Can you please help ?
Thank you,
Zvika
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在 p-listbox 标记内添加 [(ngModel)]="selectedCity",
您可以在这里查看示例:
https://stackblitz.com/edit/角度-ivy-xwxi6u?file=src/app/app.component.html
You need to add [(ngModel)]="selectedCity" inside the p-listbox tag,
you can see example here:
https://stackblitz.com/edit/angular-ivy-xwxi6u?file=src/app/app.component.html