I have this declaration:
$scope.showAlert = function() {
var alertPopup = $ionicPopup.alert({
title: 'Notification',
template: ''
);
$timeout(function() {
alertPopup.close(); //close the popup after 3 seconds for some reason
}, 30000);
};
then I have this:
if (!$scope.newDevice.name) {
$scope.showAlert.template = 'Name Required';
showAlert();
return;
}
But I don't know exactly how to update template
after I`ve declared it empty.
I have tried:
$scope.showAlert.template = 'Name Required';
or $scope.showAlert['template'] = 'Name Required';
but couldn't`t make it