title: Angular2 - Maximum Call Stack Exceeded error when rendering images
body: <p>In my Angular2 application, I want to show an image which is in Uint8Array format. But I am getting 'Maximum Call Stack Exceeded'. I could render images of size ~48Kb with no error. But when the image size is above ~300Kb is when I am getting this error. This is how I am rendering the image:</p>
  
  <pre><code>(&lt;HTMLInputElement&gt;document.getElementById("imagePreview")).src = "data:image/" + type + ";base64," +
                          btoa(String.fromCharCode.apply(null, objData.Body));
  </code></pre>
  
  <p>Can someone please tell me whether I am doing it in the right way. If not, please tell me how to do it correctly</p>