Unable to Load Image from database(Image is in byte[]) below is my code
<div ng-app="MyProductApp">
<h1>Category List</h1>
<div ng-controller="ProductsController">
<table>
<tr ng-repeat="category in Category | orderBy : 'CategoryName'">
<td><a ng-click="redirectToProductWiseCategories($event)" id="{{category.CategoryID}}">{{category.CategoryName}}</a></td>
<td>
<img ng-src="data:image/JPEG;base64,{{category.Picture}}" alt="img" />
</td>
</tr>
</table>
</div>
</div>
Below is my Method, what am I doing wrong here please. Answers would be really appreciated. Thank you in advance
<script>
var app = angular.module("MyProductApp", []);
app.controller("ProductsController", function ($scope, $http) {
$http.get('/api/Products/GetAllCategories').
success(function (data, status, headers, config) {
//debugger;
$scope.Category = data;
}).
error(function (data, status, headers, config) {
alert("erro");
});
});
</script>