I have an angular method deleteConfirm:
$scope.deleteConfirm = function(pageIndex) {
var confirmPopup = $ionicPopup.confirm({
title: 'Delete Page',
template: 'Are you sure you want to delete this page?'
});
confirmPopup.then(function(res) {
if(res) {
var permanentStorage = window.localStorage;
var noteBooks = JSON.parse(permanentStorage["noteBooks"]);
noteBooks[noteBookIndex].pages.splice(pageIndex, 1);
permanentStorage["noteBooks"] = JSON.stringify(noteBooks);
}
});
};
I want to re-render the whole page after calling this function. I tried the reload() method but it didn't work for me.