title: Bind image from service in angular 6
body: <p>I have an endpoint that provides me an image based on certain parameter. It's not an image url, its a plain image. So when i hit the endpoint in postman, in response, i receive an image (JPG).</p>
  
  <p>I do i receive this image in a variable and bind it in  tag of HTML?</p>
  
  <p>All the questions have solution for mapping an image url to image, whereas mine is an image which i have to display in UI.</p>
  
  <p><strong>show-image-component.ts</strong></p>
  
  <pre><code>this.appservice.getImage().subscribe((image) =&gt; {
      console.log(image);
   }
  )
  </code></pre>
  
  <p><strong>service.ts</strong></p>
  
  <pre><code>getImg() {
  
   return this.httpClient.get('xyz.com', {headers: this.httpHeaders});
  
   }
  </code></pre>
  
  <p>How should i display the image i receive in image variable on HTML?</p>