var LocalNotifications = require("nativescript-local-notifications");
LocalNotifications.schedule([{
id: 1,
title: 'The title',
body: 'Recurs every minute until cancelled',
at: new Date(new Date().getTime() + (10 * 1000)) // 10 seconds from now
}]).then(
function() {
console.log("Notification scheduled");
},
function(error) {
console.log("scheduling error: " + error);
}
)
In home-view-model.js but i have issue "Error in LocalNotifications.schedule: TypeError: Cannot read property 'class' of undefined".
What can be wrong?
In my app i'am try this code
var LocalNotifications = require("nativescript-local-notifications"); LocalNotifications.schedule([{ id: 1, title: 'The title', body: 'Recurs every minute until cancelled', at: new Date(new Date().getTime() + (10 * 1000)) // 10 seconds from now }]).then( function() { console.log("Notification scheduled"); }, function(error) { console.log("scheduling error: " + error); } ) In home-view-model.js but i have issue "Error in LocalNotifications.schedule: TypeError: Cannot read property 'class' of undefined". What can be wrong?