title: Adding link preview in Angular2
body: <p>HTML</p>
  
  <pre><code>&lt;form&gt;
  &lt;input type="text" class="inputBoarder" name="urlName"[(ngModel)]="url" 
  placeholder="http://"&gt;
  &lt;iframe [src]=myUrl&gt;&lt;/iframe&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>TS</p>
  
  <pre><code>private myUrl;
  private url= 'https://www.youtube.com/watch?v=KMX1mFEmM3E';
  constructor(domsanitizer: DomSanitizer) {
  this.myUrl = domsanitizer.bypassSecurityTrustResourceUrl(this.url);
   }
  </code></pre>
  
  <p>I want to be able to add a link view as soon as I paste something into the input field. Right now I am able to add the view if I have the link hard coded but it wont reload upon pasting a new one.
  <a href="https://i.stack.imgur.com/KFhJX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KFhJX.png" alt="Current Output"></a>
  <a href="https://i.stack.imgur.com/mSBPP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mSBPP.png" alt="Desired output"></a></p>