Ngx-Spinner it is working fine when i call it in inside the main module i.e. app-module.
I am using line spinner on complete page so i define it inside the app-component.html
<ngx-spinner bdColor="rgba(51, 51, 51, 0.47)" size="medium" color="#fff" type="line-spin-clockwise-fade"></ngx-spinner>
but in case of when i am trying to show this spinner by calling from a component of feature module , it is not working .
You need to move this ngx-spinner into separate component. You can call this spinner component using Subject/BehaviorSubject using next() operator in the source component.
You can listen for the data in the 'ngx-spinner' component using subscribe method for display/hide the spinner.
When working with feature modules and lazy loading, you also need to import the NgxSpinnerModule into your feature module.
@NgModule({
imports: [
CommonModule,
NgxSpinnerModule,
...
],
})
export class FeatureModule { ... }
Hope it helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With