I am trying to use local notification in my ionic app so I passed some arguments in my click function, in this.platform.ready() I have the following:
this.lnotification.on("click", (notification,status)=>{
let ttsoptions: TTSOptions = {
"text": JSON.parse(notification.data).AlarmText,
"locale": 'en-US',
"rate": 0.8
};
this.tts.speak(ttsoptions)
.then(()=>{
console.log("it spoke tts worked");
})
.catch((ttserr)=>{
alert(JSON.stringify(ttserr) +" jp"+JSON.parse(notification.data).AlarmText+" "+ notification.data + "status is"+status+ "didnt speak");
});
this.rootPage = "AlarmlistPage";
});
This is the line giving the error: (notification,status)
What can I do to avoid
(parameter) notification: any Expected 1 arguments, but got 2.
?