Skip to content
This repository was archived by the owner on Sep 15, 2021. It is now read-only.

Commit 7f4ee67

Browse files
committed
Updated $cordovaLocalNotification to latest plugin version
1 parent d07e8d6 commit 7f4ee67

File tree

3 files changed

+248
-58
lines changed

3 files changed

+248
-58
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ coverage
99
Gemfile.lock
1010
.DS_Store*
1111
npm-debug.log
12+
.project

demo/www/app/localNotification/localNotification.ctrl.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ angular.module('demo.localNotification.ctrl', [])
77
var _60_seconds_from_now = new Date(now + 60 * 1000);
88
var event = {
99
id: 1,
10-
date: _60_seconds_from_now,
10+
at: _60_seconds_from_now,
1111
title: "Test Event",
12-
message: "this is a message about the event",
13-
badge: 2
12+
text: "this is a message about the event"
1413
};
1514

1615
document.addEventListener("deviceready", function () {
1716
$cordovaLocalNotification.schedule(event).then(function () {
18-
alert("local add : success");
17+
console.log("local add : success");
1918
});
2019

2120
}, false);
2221

2322
};
2423

2524
document.addEventListener("deviceready", function () {
26-
$rootScope.$on("localNotification:triggered", function (event, notification) {
27-
alert("notif id:" + notification.id + " state: " + notification.state);
28-
})
25+
$rootScope.$on("$cordovaLocalNotification:trigger", function (event, notification, state) {
26+
console.log("notification id:" + notification.id + " state: " + state);
27+
});
2928
}, false);
3029
});
30+

0 commit comments

Comments
 (0)