I am trying to do reload of current state for my ionic program and my code looks something like this:
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 doing the reload by reference to the answer from Reloading current state - refresh data.
It does reload as I see a "flash" on the screen. However, why is that I don't see console log output and ionic popup after reload? How can I get everything re-executes after reload?