question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Local notifications problem with Angularjs

See original GitHub issue

I have a problem with Android mobile notifications. I am using Angularjs and ionic framework. I want to work with local notifications and I use this plugin. https://github.com/katzer/cordova-plugin-local-notifications

<addr> var app = angular.module('Forex', ['ionic', 'ngCordova']) app.controller("MainCtrl", function($scope,$http,$interval, $ionicPlatform, $cordovaLocalNotification) {

$ionicPlatform.ready(function () { $scope.scheduleSingleNotification = function () { $cordovaLocalNotification.schedule({ id: 1, text: ‘test’ }) .then(function (result) { console.log(result); }); }

});

But if I press the button in my html page ng-click=“notification()”

I get an error ReferenceError: $cordova is not defined

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
romanornrcommented, Oct 26, 2015

@PatrickDinh I get this error Uncaught TypeError: Cannot read property ‘notification’ of undefined

Why is every documentation about this plugin so different. Every website and person says something else.

0reactions
Derek-phelpscommented, Dec 13, 2020

Hi, @guys. I’m trying to implement this package into Angular8 app. But not sure how to import it and use correctly. I will appreciate if anyone guide me to use it. Thanks. Cheng

Read more comments on GitHub >

github_iconTop Results From Across the Web

angularjs - Repeated local notifications - Stack Overflow
I am developing an application with local notifications with values coming from the database. However, it is repeating the notification with the ...
Read more >
Developers - Local notifications problem with Angularjs -
I have a problem with Android mobile notifications. I am using Angularjs and ionic framework. I want to work with local notifications and...
Read more >
Angular Push Notifications: a Complete Step-by-Step Guide
Learn how to setup Web Push Notifications in your Angular Application using the Angular Service Worker.
Read more >
Notification with AngularJS does not update - jQWidgets
Hi there, in the Notification with AngularJS example the text does not update directly. For example <!DOCTYPE html> <html ng-app="demoApp"> ...
Read more >
AngularJS to Angular concepts: Quick reference
This guide helps you transition from AngularJS to Angular by mapping AngularJS syntax to the corresponding ... Here, movie is a user-defined local...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found