Activity Indicator is not shown


I’m struggling with an issue preventing Activity Indicator being shown in my Angular-Nativescript Project.
I have a method deleteData (see below) executing a long-running task: I need to display “Activity Indicator” at the start and at the end of the method.

The activity Indicator is not displayed, maybe because Angular doesn’t refresh the UI during method execution - I tried to use also Promise and Observable but I had the same result - any idea how to solve?

public deleteData() {
var loader = new LoadingIndicator();;
// long running task


I don’t think that plugin supports Angular (yet not sure). I use something similar to this in my Angular app.


First of all, thanks for your suggestion.

I tried your sample without changes and it worked - but if I move the logic/code from NgInit to a method (see below sample), it doesn’t work anymore.

My requirement is to have a button to execute a long-running task - so, I need a specific method with the logic to display the loader, execute the task and hide the loader.

Any idea on the issue with below implementation?

public deleteData() {
// Long running task
setTimeout(uiHelper.hideLoader, 2000);


It should work. If you are able to reproduce the issue in the play example, please do so and share so I can dig further.


You’re right - it works.

Also LoadingIndicator plug-in works now :slightly_smiling_face:
The secret is to place inside the method the “setTimeout” call: this one forces UI refresh

Thanks again for suggestion

            setTimeout(() => {
                // Long running task
            }, 100);