ng4-loading-spinner
ng4-loading-spinner copied to clipboard
Spinner is hiding after some time. Its not waiting for hide() method?
I am using 1.2.3 version of the plugin.
Expected Behavior: once i call this.spinnerService.show() showing the loader fine. the loader only hide when i call this.spinnerService.hide().
CurrentBehavior: once i call this.spinnerService.show() showing the loader fine but after 5 seconds its automatically hiding. I need to hide the loader once i call hide() method.
I've ran into the same issue - Angular 6 tested on 1.1.3 (obviously does not work) then 1.2.0 and 1.2.3 - on both loader hides itself (even though there is no .hide() method invoked).
Done nothing more than imported Ng4LoadingSpinnerModule and added
I am just starting to look at this component but according to the docs, this is by design. This parameter will automatically hide the spinner after some time.
[timeout] : Accepts time in milliseconds to hide the spinner automatically. Default is 5000 ms.
I am unsure if this can be disabled but you could just set it to a crazy high number if you never want it to happen. (I personally do not see a use case for this...why would you want to hide the spinner on a long running operation before it finishes...)
@JayCallas temporarily i did that one But i felt that is not the good solution for it. May be they should come up with solution to disable auto hiding after 5000 ms.
@manojcena @JayCallas Same here...after upgrading project to angular 6. Spinner hiding after some time and its not waiting for hide method
@manojcena @JayCallas I also faced the same issue. You can try this spinner https://www.npmjs.com/package/ngx-spinner it's working properly with angular 6 and have some other features
Hi All,
You need to set time [timeout] property in ng-loading-spinner. By default it's 5 seconds.
HI @andynrkri , If I need to dismiss after getting the HTTP response, what should I do? I have a file upload and I need to dismiss only after complete posting. But now it will dismiss before completion. Thanks
The default for [timeout] should be 0 which should disable the timeout.
I just came up on this same issue. I've submitted PR #49.
Add this line in your html file.
<ng4-loading-spinner [timeout]="99000">
credit: @jdhines
ngxspinner.hide() is not working in angular v9. working fine if we keep it in each child component , but if keep it as common in parent component ,the spinner is unable to hide, even though we are calling hide().
We have same issue, ngxspinner.hide() is not working in angular v9
We have same issue, ngxspinner.hide() is not working in angular v9
Is there any alternate solution?
try with this, if you hide spinner from ngonint() or calling from ngonint() setTimeout(() => this.spinner.show(), 25); It worked for our scenario.
try with this, if you hide spinner from ngonint() or calling from ngonint() setTimeout(() => this.spinner.show(), 25); It worked for our scenario.
if we write in ngoninit() it is working , but i want to hide() after subcribing, and show before subscribing , in this case it is not working
try with this, if you hide spinner from ngonint() or calling from ngonint() setTimeout(() => this.spinner.show(), 25); It worked for our scenario.
if we write in ngoninit() it is working , but i want to hide() after subcribing, and show before subscribing , in this case it is not working
From where are you calling API, not from ngonint?
try with this, if you hide spinner from ngonint() or calling from ngonint() setTimeout(() => this.spinner.show(), 25); It worked for our scenario.
if we write in ngoninit() it is working , but i want to hide() after subcribing, and show before subscribing , in this case it is not working
From where are you calling API, not from ngonint?
No,not from ngoninit()
i am calling the method when button is clicked , at that point of time i am calling ngxspinner.show() , and after subscribed(result=>{this.spinner.hide()} i am calling like. this.spinner.hide() is never hidding until we press some key/button.
i am calling the method when button is clicked , at that point of time i am calling ngxspinner.show() , and after subscribed(result=>{this.spinner.hide()} i am calling like. this.spinner.hide() is never hidding until we press some key/button.
did you try this setTimeout(() => this.spinner.hide(), 25);
i tried it worked while intial loading of the page ,but i want when i click the button
but, instead of ngx spinner, i changed from this website https://www.angularjswiki.com/angular/creating-progress-spinner-in-angular/ it worked