Permalink
Browse files

Updated $cordovaLocalNotification to latest plugin version

  • Loading branch information...
1 parent d07e8d6 commit 7f4ee67c7c47ff937b76f077251ba7479ee8f400 @DanailMinchev DanailMinchev committed Mar 22, 2015
Showing with 248 additions and 58 deletions.
  1. +1 −0 .gitignore
  2. +7 −7 demo/www/app/localNotification/localNotification.ctrl.js
  3. +240 −51 src/plugins/localNotification.js
View
@@ -9,3 +9,4 @@ coverage
Gemfile.lock
.DS_Store*
npm-debug.log
+.project
@@ -7,24 +7,24 @@ angular.module('demo.localNotification.ctrl', [])
var _60_seconds_from_now = new Date(now + 60 * 1000);
var event = {
id: 1,
- date: _60_seconds_from_now,
+ at: _60_seconds_from_now,
title: "Test Event",
- message: "this is a message about the event",
- badge: 2
+ text: "this is a message about the event"
};
document.addEventListener("deviceready", function () {
$cordovaLocalNotification.schedule(event).then(function () {
- alert("local add : success");
+ console.log("local add : success");
});
}, false);
};
document.addEventListener("deviceready", function () {
- $rootScope.$on("localNotification:triggered", function (event, notification) {
- alert("notif id:" + notification.id + " state: " + notification.state);
- })
+ $rootScope.$on("$cordovaLocalNotification:trigger", function (event, notification, state) {
+ console.log("notification id:" + notification.id + " state: " + state);
+ });
}, false);
});
+
Oops, something went wrong.

0 comments on commit 7f4ee67

Please sign in to comment.