angular - Angular 访问图像 src 属性
问题描述
如何[src]
从控制器中的函数访问图像属性?
<ion-slides pager>
<ion-slide *ngFor="let image of uploadService.downloadURLs">
<img [src]="image" class="slide-image" />
</ion-slide>
</ion-slides>
解决方案
由于您已经在 component.ts 中拥有了 uploadService.downloadURLs,因此您应该可以得到它。
否则你可以做(click) = getImage(image)
推荐阅读
- scala - Spark Streaming Kafka:使用 spark-submit 运行时 ByteArrayDeserializer 的 ClassNotFoundException
- amazon-web-services - AWS 配置运行状况检查 EC2
- pandas - Pandas groupby,求和并填充原始数据框
- ios - Xcode 在丢弃所有更改后删除 pod 文件文件夹和架构
- pandas - 如何有条件地重置熊猫数据框中的滚动最大初始值/行?
- c# - 使用 linq 在相关表中选择实体属性
- rust - 为什么调用消耗后调用 BufReader::fill_buf 返回的字节数比我预期的少?
- html - 带有`position:sticky;`的粘性页脚
- vue.js - VueJS - 未知的本地操作类型:addProductToCart,全局类型:cart/addProductToCart
- visual-studio - TFS 2010 Team Foundation 服务不可从服务器获得
. 无法连接到远程服务器