title: Angular 6 input file, how to display preview of pdf file
body: <p>I have simple app where I have input where I can upload pdf file and</p>
  
  <pre><code>&lt;input (change)="upload($event)"
         multiple
         type="file"/&gt;
  
  &lt;object [data]="file" type="application/pdf"&gt;
      &lt;embed [src]="file" type="application/pdf" /&gt;
  &lt;/object&gt;
  </code></pre>
  
  <p>in upload function:</p>
  
  <pre><code>upload(event) {
  this.file = event.target.files[0];
  }
  </code></pre>
  
  <p>How can I display preview of that file?</p>