title: ionic ng-cordova vibrate plugin not working
body: <p>I am new to ionic and cordova this vibrate plugin is not working.
  Can you please point out the error?</p>
  
  <p>This is index.html:</p>
  
  <pre><code>&lt;body ng-app="starter"&gt;
      &lt;ion-pane&gt;
          &lt;ion-header-bar class="bar-stable"&gt;
              &lt;h1 class="title"&gt;Ionic Blank Starter&lt;/h1&gt;
          &lt;/ion-header-bar&gt;
          &lt;ion-content ng-controller="myCtrl"&gt;
              &lt;button ng-click="toggle()"&gt;Toggle&lt;/button&gt;
          &lt;/ion-content&gt;
      &lt;/ion-pane&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>This is app.js in js folder:</p>
  
  <pre><code>var ionicApp = angular.module('starter', ['ionic', 'ngCordova'])
  
  ionicApp.controller("myCtrl", function($scope, $cordovaVibration)) {
  
      $scope.toggle = function() {
          $ionicPlatform.ready(function() {
              $cordovaVibration.vibrate(100).then(function() {
                  console.log("Phone vibrating");
              })
  
          });
  
      }
  
  }
  
  .run(function($ionicPlatform) {
      $ionicPlatform.ready(function() {
          // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
          // for form inputs)
          if (window.cordova &amp;&amp; window.cordova.plugins.Keyboard) {
              cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
          }
          if (window.StatusBar) {
              StatusBar.styleDefault();
          }
      });
  })
  </code></pre>
  
  <p>I have added <code>ng-cordova</code> vibrate plugin.</p>