My goal is to implement a state reload functionality in my Ionic program, and the code I have written for this purpose looks like the following:
angular.controller('myController', function($ionicPopup,$state,$stateParams){
console.log("myController");
$ionicPopup.confirm({
title: "Alert",
template: "Want to reload?",
cancelText: "Cancel",
okText: "Reload",
okType: 'button-assertive'
}).then(function(res){
if( res ){
$state.transitionTo($state.current, $stateParams, {
reload: true,
inherit: false,
notify: true
});
}
});
});
I am implementing the reload based on the answer provided at Reloading current state - refresh data.
The reloading process works as intended with a noticeable screen flash. However, I am facing issues where the console log output and Ionic popup do not appear after the reload. How can I ensure that everything re-executes effectively post-reload?