1

I am using angular 4. And trying to add loading bar, till I didn't get the response from the server side. When Request gets complete, it should not hide. For this I am using below code In module.ts:

import { NgProgressModule } from 'ngx-progressbar';
@NgModule({
imports: [
    NgProgressModule
]
)}

And in Html file I am using below:

<ng-progress [positionUsing]="'marginLeft'"
[direction]="'leftToRightIncreased'"
[color]="'#4286f4'" [trickleSpeed]="500" 
[thick]="true" [ease]="'easeInSine'" ></ng-progress>

1 Answer 1

1

In components, wherever you need the progress bar, you have to

import { NgProgress } from 'ngx-progressbar';

and

constructor(private ngProgress: NgProgress) { 
}

use start() and stop() as you need

this.ngProgress.start();
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, @Sajeetharan, for your intention toward this. It works for me, but instead of stop(), "done()" works for me. i.e: this.ngProgress.done();

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.