/EDIT: , AngularJS, Angular. , google, Angular 1.x.
RANT: ( Angular 1.x AngularJS , Angular2 Angular , . Angular 2 4 Angular2 Angular4, Angular 1.x Angular)/end of rant
, ,
$scope.takePicture = function(type) {
if (typeof(Camera) != 'undefined') {
var photoType = Camera.PictureSourceType.CAMERA;
if (type == 'gallery') {
photoType = Camera.PictureSourceType.SAVEDPHOTOALBUM;
}
var options = {
quality : 80,
destinationType : Camera.DestinationType.DATA_URL,
sourceType : photoType,
allowEdit : false,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 625,
targetHeight: 800,
saveToPhotoAlbum: false,
correctOrientation: true
};
$cordovaCamera.getPicture(options).then(function(imageData) {
$scope.images.push({slikaB64:imageData,opis:null});
}, function(err) {
});
}
else
$scope.images.push({slikaB64:"R0lGODlhDwAPAKECAAAAzMzM/////wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4MLwWACH+H09wdGltaXplZCBieSBVbGVhZCBTbWFydFNhdmVyIQAAOw==",opis:'123'})
}