How can I fix the issue with my alerts not working on my iOS project? I am using Ionic and AngularJS to develop my app.
The problem I am facing is that when the alert pops up, the title shows as "index.html". This is how I call the alert:
alert("aaa");
I have read that Cordova allows for changing the title by using navigator.notification.alert. However, the alert does not show up when I call it.
This is how I am calling the alert:
.controller('MyCtrl',function(){
$scope.myfunction = function(){
var success = function(data){
//do something
};
var failure = function(message){
navigator.notification.alert(
"This is my Alert text!",
callBackFunctionB, // Specify a function to be called
'Alert Title',
"OK"
);
};
function callBackFunctionB(){
console.log('ok');
}
}
});
I have added the plugin and included the key in infoplist following the instructions in PhoneGap documentation. Can anyone provide assistance?