0
我正嘗試構建一個用於向用戶發送一些指導通知的ionic2應用程序,當他點擊通知而不是主頁時,我想將用戶發送到特定頁面。 這裏是我的代碼:在ionic2通知按鈕中添加動作
public schedule(title, text) {
LocalNotifications.schedule({
title,
text,
at: new Date(new Date().getTime() + 1* 1000)
});
}
LocalNotifications.on("click", (notification, state) => {
let alert = this.alertCtrl.create({
title: this.todos[this.num].info.nom_du_musee,
subTitle: this.todos[this.num].info.periode_ouverture+" "+this.todos[this.num].info.adr+" site web "+this.todos[this.num].info.sitweb,
buttons: ["OK"]
});
alert.present()
});
}