I have an alert showing if an array is empty on a button click. The function saveInterests()
is attached. I would like to reload the current state (which contains swipe cards) after the alert is dismissed. This is not functioning.
$scope.saveInterests = function () {
if (interests.length < 1) {
$ionicPopup.alert({
title: "Warning",
template: 'Please try again',
});
//alertPopup.then(function (res) {
$state.reload()
}
else {
$localStorage.setObject('myInterests', interests);