nativescript-loading-indicator
nativescript-loading-indicator copied to clipboard
Loader shows on every route change
I installed the loader on my Nativescript 6.x project and it works great.
However, it also flashes briefly on any route change / page navigation, even if I have not called it.
Has anyone else seen this? Any way to only show when I specifically call this.loader.show() ?
Loading Service Code:
import { Injectable } from '@angular/core'; import { LoadingIndicator, Mode, OptionsCommon } from '@nstudio/nativescript-loading-indicator';
@Injectable({ providedIn: 'root' }) export class LoadingService {
public loader = new LoadingIndicator();
constructor() {
}
public showLoader() { this.loader.show(); }
public hideLoader() { this.loader.hide(); }
}
That's interesting. Must have to deal with the injectable being in root 🤔 I've not used this setup in any projects myself so I've never seen it.