javascript - AngularJS displaying image using base64 string -


i have image stored in database , want use angular display it. html page looks this:

<img ng-if="controller.model.logo && !controller.result" ng-src="{{ controller.model.logo }}" /> 

and model looks this:

{     "id":1,     "name":"test",     "logo":"data:image/gif;base64,r0lgodlhgaqhafcaai6sls3o1npt1picplq9xfv47t/j5zwwm73dy…i+amvciiqn6qqaivtzzkziomicbb0lmumqg79lxkqajjl3xuje4hwbrib9cv9cgpcsnzecaga7",     "theme":"black",     "centers":null } 

but image not displaying. doing wrong?

try this

<img ng-if="controller.model.logo && !controller.result" ng-src="{{controller.model.logo}}" /> 

using string interpolation ng-src attribute


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -