I'm trying to display an image from byte array using Angularjs. I have tried each of the solutions I've found on the web, but none of them are working.
Currently, in my HTML, I have:
<img ng-src="data:image/jpeg;base64,{{company.imgCompanyLogo}}" />
My controller code is:
angular.module('myModule').controller('ContractorCtrl', function ($scope, contractorService, $interval, $window) {
getcontractorInfo();
function getcontractorInfo() {
contractorService.getContractorInfo()
.success(function (data) {
$scope.company = data;
});
};
Everything I've read says what I am doing should work. All the data retrieved displays except for the picture, and I'm sure the name of the field "imgCompanyLogo" is correct. What am I missing?
Any assistance is greatly appreciated!