Code: Select all
cordova plugin add org.apache.cordova.device
Code: Select all
photoApp.controller('AccountCtrl', function ($scope, $cordovaDevice, $ionicPlatform) {
$scope.settings = {
enableGps: true
};
$ionicPlatform.ready(function () {
//find application version
if (window.cordova) {
$scope.uuid = $cordovaDevice.getUUID();
$scope.cordova = $cordovaDevice.getCordova();
$scope.model = $cordovaDevice.getModel();
$scope.platform = $cordovaDevice.getPlatform();
$scope.platformVersion = $cordovaDevice.getVersion();
alert($scope.model);
alert($scope.platform);
}
});
});