【发布时间】:2019-06-17 11:56:49
【问题描述】:
我正在尝试显示 blob 图像。在 IE 11 中不支持它并显示损坏的图像,因此我创建了一个将 blob 图像转换为 base 64 的管道。
有没有办法可以将此管道绑定到新创建的图像元素?
以下代码似乎不起作用,
const uploadedImgElement = document.createElement('img');
uploadedImgElement.src = response.data.attachmentDetails.fileFullPath + '| blobToBase64';
blobToBase64 是一个管道。
【问题讨论】:
-
构造函数(私有管道:YourPipeComponentName){} YourFunction(value) { this.pipe.transform(value, 'pipeFilter'); }
标签: angular angular6 pipe blob internet-explorer-11