html - 如何在 Onsen UI 中制作卡片视图列表?
问题描述
有这样的 HTML 代码,我想使用带有温泉 UI 的卡片视图来实现它。
<div *ngIf="content">
<div>
<img src="https://monaca.io/img/logos/download_image_onsenui_01.png" alt="Onsen UI" style="width: 100%">
</div>
<div>
<label>title : </label> {{content.title}}
</div>
<div>
<label>Captio : </label> {{content.caption}}
</div>
当我没有用卡片温泉实现代码时,我得到了屏幕上显示的完美数据。
但是,当我用卡片温泉实现代码时,卡片只会在屏幕上显示最新数据。
为什么要这样做?这是我试图用卡片温泉实现的代码。
<ons-page>
<ons-card>
<div class="content">
<div *ngIf="content">
<div>
<img src="https://monaca.io/img/logos/download_image_onsenui_01.png" alt="Onsen UI" style="width: 100%">
</div>
<div>
<label>title : </label> {{content.title}}
</div>
<div>
<label>Captio : </label> {{content.caption}}
</div>
</div>
</div>
</ons-card>
解决方案
推荐阅读
- wordpress - WordPress PieChart 中的数字是四舍五入的
- python - python中的copyright()方法有什么作用?
- python - 如何使用熊猫从给定列中具有不同数据类型的数据集中过滤数据?
- amazon-web-services - AWS Fargate 价格
- r - 如何在不使用 dcast 的情况下将类型列表的列取消嵌套为宽格式
- html - Angular 在 ngFor 循环中切换 div
- python - numpy 数组时间点现值
- ios - 完成个人目标后更新并重新加载 UITableView
- python - 朱莉娅 UndefVarError: unshift! 没有定义的
- docker - 在运行时替换 Dockerfile 的 ENV 值