Skip to content
This repository has been archived by the owner on Dec 19, 2021. It is now read-only.

Loader shows on every route change #11

Open
tskweres opened this issue Sep 12, 2019 · 1 comment
Open

Loader shows on every route change #11

tskweres opened this issue Sep 12, 2019 · 1 comment

Comments

@tskweres
Copy link

tskweres commented Sep 12, 2019

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

}

@bradmartin
Copy link
Collaborator

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants