Trying to implement local notification with the following error as a result:
TypeError: Cannot read property 'notification' of undefined
Code in question is,
function(){
$ionicPlatform.ready(function() {
$cordovaLocalNotification.add({
id: '1',
message: "Push!!"
})
}, false);
return true
}
I made the app from ionic tabs example. Controller in which this call is happening looks like
Updated
angular.module('starter.controllers', ['ionic','ngCordova'])
.controller('FriendsCtrl', function($scope, $ionicPlatform, $cordovaLocalNotification,Friends) {
index.html looks like
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
<script src="js/filters.js"></script>
<script src="cordova.js"></script>
UPDATE
$ionicPlatform is not defined has been fixed, real issue lies in
TypeError: Cannot read property 'notification' of undefined