How to display base64 pdf in angular template file

佐手、 提交于 2020-01-07 19:33:04

问题


I have a base 64 encoded string, I want to display it on my angular template file.


回答1:


Try

<img [src]="yourEncodedStringVariable"/>

where yourEncodedStringVariable= data:image/png;base64,[your base 64 string]



来源:https://stackoverflow.com/questions/59500310/how-to-display-base64-pdf-in-angular-template-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!