I want to hide the default servoy Loading Indicator from backend once my error is logged on my view. I see the document where it suggests to use $sabloLoadingIndicator but how can I hide it from my backend because I don’t see anything like that in plugins. https://wiki.servoy.com/display/DOCS/St … e+NGClient
Please suggest.
Thanks
the $sabloLoadingIndicator is a client-side Angular service. The wiki here describes how the service could be overriden to display for instance a loading dialog rather than a loading indicator. Is not what you are looking for.
This service is purely a client-side thing, therefore you can’t call it from our default plugins; unless you make your own web-service plugin which calls the $sabloLoadingIndicator.
Anyhow Servoy automatically takes care to show/hide the loading indicator while is processing something, you should not proactively show/hide the loading indicator your self; therefore what is exactly your problem ?
You say: “i want to hide the loading indicator once the error is logged on my view”; what this exactly mean ? once the method execution is completed, doesn’t the loading indicator already hides itself ?
which shows a custom spinner, but once we show the error to user the spinner still keeps on spinning and doesn’t hide automatically. So I was of thinking on manually hiding it once we show the error popup to the user.In the attachment you can see our custom spinner and an error popup.[attachment=0]error1.PNG[/attachment]
“once the method execution is completed, doesn’t the loading indicator already hides itself ?”
Yes it doesn’t hide, although my execution is already completed and I don’t see any breakpoints.
“once the method execution is completed, doesn’t the loading indicator already hides itself ?”
Yes it doesn’t hide, although my execution is already completed and I don’t see any breakpoints.
I see, what happens if you don’t override the default loader indicator and you use the default loader instead ? Does also the default loader indicar remains visible despite nothing is being executed in the mean-time ?
Have you tried to debug your service, for instance placing an console.log("i am hiding " + new Date()) into the hideLoading function to see if the function is actually being called at all ? (the log message would show up in the browser).
I believe you could still make your own web service which pro-actively calls the loading indicator hideFunction, however, in case you can reproduce the issue also with the default loader indicator, sounds to be a better idea to create a case in our https://support.servoy.com with a sample solution.
I tried the same thing with servoy’s default cursor and its the same behaviour i.e. spinner doesn’t hide. I am attaching an image for the reference.
“I believe you could still make your own web service which pro-actively calls the loading indicator hideFunction”
. I would look into this approach
in case you can reproduce the issue also with the default loader indicator, sounds to be a better idea to create a case in our https://support.servoy.com with a sample solution.
. I would have to look how to create an exact sample for your reference.
I would also like to inform that this thing occurs only in some of the scenarios and not everytime. For e.g if I have some error related to database fields ,my spinner works just fine but in the current situation the spinner didn’t work as expected.
Thanks for the suggestion.[attachment=0]ezgif.com-video-to-gif.gif[/attachment]
I would also like to inform that this thing occurs only in some of the scenarios and not everytime
indeed i expected this to happen only in some specific scenario, that’s why a sample solution is necessary to look into it.
“I believe you could still make your own web service which pro-actively calls the loading indicator hideFunction”
. I would look into this approach
I have never tried before but i guess you should try to inject, using the angular module injection, the loadingIndicator or the ($sabloLoadingIndicator) into your new web service and call the hideLoading function.
But again, i reccomend to create an issue in our support system rather than workaround the problem yourself.