Skip to content

HttpClient requests

Murhaf Sousli edited this page Oct 7, 2018 · 17 revisions

Overview

Use this plugin to start and complete the progress bar with your HTTP requests.

Installation

NPM

npm i -S @ngx-progressbar/core @ngx-progressbar/http

YARN

yarn add @ngx-progressbar/core @ngx-progressbar/http

Usage

import { HttpClientModule } from '@angular/common/http';
import { NgProgressModule } from '@ngx-progressbar/core';
import { NgProgressHttpModule } from '@ngx-progressbar/http';

@NgModule({
  imports: [
    // ...
    HttpClientModule,
    NgProgressModule.forRoot(),
    NgProgressHttpModule.forRoot()
  ]
})

And just add the progress bar component in your template

<ng-progress></ng-progress>

NgProgressHttpConfig API

Name Default Description
id root Progress bar ID.
silentApis [ ] Array of silent APIs which will be ignored.

See Http stackblitz

Clone this wiki locally