title: Angular4 add it's hostname to image src
body: <p>When trying to show images from server :
  <strong>Template</strong> </p>
  
  <pre><code>&lt;img [src]="file.url"&gt;
  </code></pre>
  
  <p><strong>Component</strong> 
  (1) when i try this </p>
  
  <pre><code>  this.file.url="http://localhost:4000/uploads/results/101_5.png";
  </code></pre>
  
  <p>It works fine 
  (2) But when doing, </p>
  
  <pre><code> this.file.url=this.fromServer.url; // URl from server
  </code></pre>
  
  <p>Doesn't work and Angular add a it's host and i get this error : </p>
  
  <pre><code>101_5.png:1 GET http://localhost:4000/uploads/results/101_5.png 404 (Not Found)
  </code></pre>
  
  <p>(3) even this way :</p>
  
  <pre><code>this.file.url= "http://"+this.sanitizer.bypassSecurityTrustResourceUrl(this.fromServer.url);
  </code></pre>
  
  <p>getting this error </p>
  
  <pre><code>src="http://SafeValue must use [property]=binding: http://localhost:400 .... (see http://g.co/ng/security#xss)
  </code></pre>