nativescript-loading-indicator icon indicating copy to clipboard operation
nativescript-loading-indicator copied to clipboard

Loader shows on every route change

Open tskweres opened this issue 5 years ago • 1 comments

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(); }

}

tskweres avatar Sep 12 '19 04:09 tskweres

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.

bradmartin avatar Sep 12 '19 14:09 bradmartin