【发布时间】:2013-02-20 12:23:41
【问题描述】:
我正在我的数据库中搜索一个字节数组的图像。我想使用标记 image 将此内容显示为文件,但在这里不起作用。
// Controller which get my image and put into $scope.
function MyController($scope, $http, $location) {
var url = '/json/FindImage?id=1';
$http.get(url).success(function(result) {
$scope.image = result.Image;
}
}
// HTML
<!-- It doesn't work -->
<img src="{{image}}" />
<!-- It doesn't work also -->
<img ng-src="{{image}}" />
有什么想法吗? 谢谢大家!
【问题讨论】:
标签: javascript angularjs