how to hide loading icon for error processing

3 posts, 0 answers
  1. David
    David avatar
    13 posts
    Member since:
    Apr 2013

    Posted 06 Jan Link to this post

    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");

  2. Tsvetina
    Tsvetina avatar
    1861 posts

    Posted 08 Jan Link to this post

    Hi David,

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


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

  3. David
    David avatar
    13 posts
    Member since:
    Apr 2013

    Posted 12 Jan in reply to Tsvetina Link to this post

    Thanks!!!  That solved it.
Back to Top