1

ngx-spinner is not hiding after time out. It is showing for infinite time

In app.component.ts

import { NgxSpinnerService } from 'ngx-spinner';

constructor(private spinner: NgxSpinnerService) {}

ngOnInit(){
    this.spinner.show();
    setTimeout(() => {

        this.spinner.hide();
    }, 5000);
  }

In app.component.html

<ngx-spinner> </ngx-spinner>
Shaik khaja Hussain
  • 335
  • 1
  • 4
  • 16

3 Answers3

0

This is the issue with latest version of ngx-spinner(v7+), It is Working fine with 6.1.2 version.

Shaik khaja Hussain
  • 335
  • 1
  • 4
  • 16
  • Do you think that this actually answers your question? If not and it is more of an addendum then please eidt the question and delete this non-answer. – Yunnosch May 26 '20 at 05:49
0

You should provide name for spinner to ngx-spinner v7+.

0

I had the same problem, if you check your console, you might find this error message "BrowserAnimationsModule” or “NoopAnimationsModule” in your application", this is solved in this thread stackoverflow: How to include BrowserAnimationModule in your Angular app If you follow those steps, everything should work just fine.