Getting 'device is not defined' error with ngCordova getUUID()
In the process of developing a mobile app using Ionic framework, I encountered an issue with retrieving the device UUID. To tackle this problem, I decided to leverage ngCordova by incorporating the minified version available at ngCordova.
Below is an excerpt from my main module:
angular.module('starter', ['ionic','ngCordova'])
.controller('test',function($scope,$cordovaDevice){
$scope.uuid=$cordovaDevice.getUUID();
console.log($cordovaDevice)
})
Although $cordovaDevice appears as an object when inspected through console.log, invoking $cordovaDevice.getUUID() triggers an error stating 'device is not defined'. Any insights on resolving this issue would be greatly appreciated.