我正在我的数据库中搜索图像作为字节数组。我想使用标记图像将此内容显示为文件,但在这里不起作用。
// 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}}" />
任何的想法?谢谢你们!