http://www.scientiamobile.com/page/angularwit
希望能够做这样的事情:
<img-wit ng-src="{{trustSrc(profile.pic)}}" w="100"/>
尽管空白区域的大小正确,但图片并未渲染。是否可以将 img-wit 的 Angular 指令版本与 ng-src 一起使用?
更新:
确定使用 img-wit 的最简单方法是根本不实现 angularjs 指令。相反,只需在 Controller 内附加适当的 img-wit 链接前缀即可。
最佳答案
0.9.1版本中添加了对ngSrc指令的支持:https://github.com/WURFL/angular-wurfl-image-tailor/releases/tag/0.9.1 .
现在支持如下语法:
<img-wit ng-src="{{myUrl}}"></img-wit>
其中 {{myUrl}} 是要加载的可信图像的 URL。
请查看https://github.com/WURFL/angular-wurfl-image-tailor#how-to-use-it了解更多详情。
免责声明:我在 ScientiaMobile 工作
关于angularjs - 如何将 AngularJS 指令与 ng-src 一起用于 WURFL img-wit?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27538060/