I have an image handler which fetches the image byte stream from DB and returns a http response Content-Type: image/jpeg
In my angularjs app I would like to get the images and show them in a table. Here is the page code:
<tr ng-repeat="product in products>
<td>
<img ng-src="{{imageMaker(product.id)}}"/>
</td>
</tr>
Controller code:
$scope.imageMaker = function (productId) {
$http.get('/Handlers/ImageRenderer.ashx', {
params: {
id: productId
}
}).then(function (res) {
return 'data:image/jpeg;base64,' + res.data;
});
}
by running this code Chrome crashes. Any help would be appreciated.