From 2fd3ae2a10bc3ccfb6bbff5d455a85003d66f778 Mon Sep 17 00:00:00 2001 From: Anurag Phadke Date: Thu, 9 Feb 2017 19:53:13 -0800 Subject: [PATCH] support for base64 encoded png images adding support for base64-encoded png images. --- angucomplete-alt.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/angucomplete-alt.js b/angucomplete-alt.js index f9fdf83d..4eca9cc1 100644 --- a/angucomplete-alt.js +++ b/angucomplete-alt.js @@ -55,6 +55,10 @@ ' ' + '
' + ' ' + + '
' + + ' ' + + '
' + + '
' + '
' + '
{{ result.title }}
' + '
' + @@ -593,6 +597,14 @@ if (scope.imageField) { image = extractValue(responseData[i], scope.imageField); } + image = ''; + if (scope.imageFieldBase64) { + image = extractValue(responseData[i], scope.imageFieldBase64); + if (image) { + image = "data:image/png;base64," + image; + } + + } if (scope.matchClass) { formattedText = findMatchString(text, str); @@ -805,6 +817,7 @@ titleField: '@', descriptionField: '@', imageField: '@', + imageFieldBase64: '@', inputClass: '@', pause: '@', searchFields: '@',