This is a migrated thread and some comments may be shown as answers.

how to hide loading icon for error processing

2 Answers 60 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 07 Jan 2016, 12:14 AM

I am trying to handle some errors such as no network connectivity or no server response.  I am able to trap error and can get the following code section to execute, I cannot figure out how to stop the loading icon that is displaying while hitting a remote datasource that still shows over my error message view.

I have searched for loading and loader and cannot see in my code where I even defined what the icon should be.  I have also searched the web for a solution however I have not found anything that works. Note, I have cloned this project from a backend services project, but have changed the datasource to connect to my own API.  I have attached image showing the loader icon, since it may give a clue as to where it is shown or hidden.

Thanks in advance for your quick help in this matter.

 

 

01.error: function (e) {
02.     e.preventDefault();
03.     //app.mobileApp.loader.hide();  GIVES AN ERROR of cannot read property of 'hide' of undefined
04.     alert("Status: " + e.status + "; Error message: " + e.errorThrown);
05.     if (e.errorThrown == "Unauthorized") {
06.        app.mobileApp.navigate("components/authSettingsView/view.html");
07.     }
08.     if (e.errorThrown == "Forbidden") {
09.        app.mobileApp.navigate("components/authSettingsView/view.html");
10.     }
11.     app.mobileApp.navigate("#errorpage");
12.},

2 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 08 Jan 2016, 09:52 AM
Hi David,

Have you tried calling app.mobileApp.hideLoading()? The method is described in the Kendo UI API reference here. I hope it helps.

Regards,
Tsvetina
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
David
Top achievements
Rank 1
answered on 12 Jan 2016, 08:15 PM
Thanks!!!  That solved it.
Tags
General Discussion
Asked by
David
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
David
Top achievements
Rank 1
Share this question
or