Restart Ionic application programmatically

Please try below code, Its working for me:

         $state.go("your_main_state_name_here");
          $ionicHistory.clearHistory();
          setTimeout(function (){
                 $window.location.reload(true);
          }, 100);

5 comments:

  1. it is not working for me.

    ReplyDelete
    Replies
    1. What issue you are facing? any error?

      Delete
    2. all its doing its refreshing the current page, but i would like for it to run app.js again

      Delete
  2. Working Fine
    Thank you

    ReplyDelete