title: Progress Bar in ng2-file-upload in Angular 6
body: <p>Id like to create a progress bar to my file upload.</p>
  
  <p>The Upload I'm using is: <a href="https://www.npmjs.com/package/ng2-file-upload" rel="nofollow noreferrer">https://www.npmjs.com/package/ng2-file-upload.</a></p>
  
  <p><strong>app.component.html</strong></p>
  
  <pre><code>&lt;div class="container-fluid"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-12"&gt;
              &lt;input type="file" name="myFile" ng2FileSelect [uploader]="uploader" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-12"&gt;
              &lt;button type="button" class="btn btn-success btn-s" (click)="uploader.uploadAll()" [disabled]="!uploader.getNotUploadedItems().length"&gt;
                  Upload an Image
              &lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>import { Component, ViewChild } from '@angular/core';
  import { FileUploader, FileSelectDirective } from 'ng2-file-upload';
  
  const URL = 'url to API';
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
  public uploader: FileUploader = new FileUploader({ url: URL, itemAlias: 'myFile' });
  
    ngOnInit() {
      this.uploader.onAfterAddingFile = (file) =&gt; { file.withCredentials = false; };
      this.uploader.onCompleteItem = (item: any, response: any, status: any, headers: any) =&gt; {
        console.log('ImageUpload:uploaded:', item, status, response);
        alert('File uploaded successfully');
      };
   }
  }
  </code></pre>
  
  <p>Everything is working fine but Id like to put a progress bar, only this.</p>