title: TypeError: Cannot read property 'plugins' of undefined for cordovaLocalNotification plugin
body: <p>I am developing hybrid application by using ionic platform. I am implementing cordovalocalnotification features but it prompt out with cannot read property 'plugins' of undefined. The following is my code. Anyone can help me to solve this problem.</p>
  
  <p>index.html</p>
  
  <p>
  </p>
  
  <pre><code>&lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"&gt;
    &lt;meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src  'self' 'unsafe-inline' *"&gt;
    &lt;title&gt;&lt;/title&gt;
  
    &lt;link href="lib/ionic/css/ionic.css" rel="stylesheet"&gt;
    &lt;link href="css/style.css" rel="stylesheet"&gt;
  
    &lt;!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
      &lt;link href="css/ionic.app.css" rel="stylesheet"&gt;
      --&gt;
  
    &lt;!-- ionic/angularjs js --&gt;
    &lt;script src="lib/ionic/js/ionic.bundle.js"&gt;&lt;/script&gt;
  
    &lt;!-- cordova script (this will be a 404 during development) --&gt;
    &lt;script src="lib/ngCordova/dist/ng-cordova.min.js"&gt;&lt;/script&gt;
    &lt;script src="cordova.js"&gt;&lt;/script&gt;
  
    &lt;!-- your app's js --&gt;
    &lt;script src="js/app.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body ng-app="starter" ng-controller="SampleController"&gt;
  
    &lt;ion-pane&gt;
      &lt;ion-header-bar class="bar-stable"&gt;
        &lt;h1 class="title"&gt;Local Notification Sample&lt;/h1&gt;
      &lt;/ion-header-bar&gt;
      &lt;ion-content&gt;
  
          &lt;button class="button button-block button-positive" ng-click="scheduleInstantNotification()"&gt;
            Instant 
          &lt;/button&gt;
  
      &lt;/ion-content&gt;
    &lt;/ion-pane&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>angular.module('starter', ['ionic', 'ngCordova'])
    .run(function ($ionicPlatform, $rootScope) {
      $ionicPlatform.ready(function () {
          if (window.cordova &amp;&amp; window.cordova.plugins.Keyboard) {
              cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
          }
          if (window.StatusBar) {
              StatusBar.styleDefault();
          }
  
          $rootScope.$on('$cordovaLocalNotification:schedule',
              function (event, notification, state) {
                  console.log("SCHEDULE");
                  console.log('event', event);
                  console.log('notification', notification);
                  console.log('state', state);
              });
  
          $rootScope.$on('$cordovaLocalNotification:trigger',
              function (event, notification, state) {
                  console.log("TRIGGER");
                  console.log('event', event);
                  console.log('notification', notification);
                  console.log('state', state);
              });
  
          $rootScope.$on('$cordovaLocalNotification:update',
              function (event, notification, state) {
                  console.log('UPDATE');
                  console.log('event', event);
                  console.log('notification', notification);
                  console.log('state', state);
              });
  
          $rootScope.$on('$cordovaLocalNotification:cancel',
              function (event, notification, state) {
                  console.log('CANCEL');
                  console.log('event', event);
                  console.log('notification', notification);
                  console.log('state', state);
              });
      });
    })
    .controller('SampleController',
      function ($scope, $cordovaLocalNotification, $ionicPlatform) {
          $ionicPlatform.ready(function () {
  
              $scope.scheduleInstantNotification = function () {
                  $cordovaLocalNotification.schedule({
                      id: 1,
                      text: 'Instant Notification',
                      title: 'Instant'
                  }).then(function () {
                      alert("Instant Notification set");
                  });;
              };
              };
          });
      });
  </code></pre>