问题描述:

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?

相关阅读:
Top