I'm creating a to-do app with MEAN stack. Input will be to-do text and to-do time, which will be stored in database. This is my code to fetch client browser time and send notification with that time. But what I need is, notification should be send when the time stored in database occurs. How I can do that?
<script>
Notification.requestPermission().then(function(result) {
var time = new Date();
var bhours = time.getHours();
var bminutes = time.getMinutes();
var btime = bhours + ':' + bminutes;
var notification = new Notification(btime);
});
</script>
via user6894496
No comments:
Post a Comment