Does not recognize the device ngcordovaDevice


I ran it once, and then did not want to work, just gives me this error

Uncaught ReferenceError: device is not defined, http://localhost:8100/lib/ngCordova/dist/ng-cordova.min.js, Line: 7

.run(function($ionicPlatform,$cordovaDevice) {
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs)
 var cord =   $cordovaDevice.getCordova();
// Initialize Push Notifications
    if (window.cordova && window.cordova.plugins.Keyboard) {
    if (window.StatusBar) {
      // org.apache.cordova.statusbar required


Hey @newmesis, here is my implementation of Pushwoosh in Ionic. Instead of $cordovaDevice.getCordova() you can just use Ionic’s utilities found here.