当前位置: 动力学知识库 > 问答 > 编程问答 >

angularjs - Localnotification onclick does not work

问题描述:

I'm building a ionic app and use ngcordova localNotification plugin.

I successfully add notification, but when the user clicks over I would remove all notification and go to message page:

$scope.addNotification = function (message) {

$cordovaLocalNotification.add({

id: '2',

message: 'Hai ricevuto '+message+' messaggi!',

title: 'Nuovo messaggi in archivio', // The title of the message

}).then(function(){$scope.clickMsg;$state.go('app.messaggi');$scope.cancelAllNotification});

};

$scope.clickMsg = function () {

$cordovaLocalNotification.onclick().then(function () {

$state.go('app.messaggi');

console.log('Cambio view');

$scope.cancelAllNotification

});

};

but this doesn't work!

Why?

分享给朋友:
您可能感兴趣的文章:
随机阅读: