angularjs - IONIC App-Horizontal, scrollable thumbnail slider -
there list of orders. when click on >(right chevron detail option), redirects me order detail page. order detail page may have list of items ordered 1 person. each item has camera option click picture.
say there 2 items each camera option, clicking 2 pictures- 1 each item. and, want display both of them in div scrollable thumbnail slider without visiting phone's storage space images. i'm trying display images thumbnails, owl carousal using http://ngcordova.com/docs/plugins/camera/ , need display thumbnail gallery in div, immidiately after taking picture. controller code being used same in above mentioned link document.
.controller('cameractrl', function($scope, $cordovacamera) { document.addeventlistener("deviceready", function () { var options = { quality: 50, destinationtype: camera.destinationtype.data_url, sourcetype: camera.picturesourcetype.camera, allowedit: true, encodingtype: camera.encodingtype.jpeg, targetwidth: 100, targetheight: 100, popoveroptions: camerapopoveroptions, savetophotoalbum: false, correctorientation:true }; $cordovacamera.getpicture(options).then(function(imagedata) { var image = document.getelementbyid('myimage'); image.src = "data:image/jpeg;base64," + imagedata; }, function(err) { // error }); }, false); })
by default ionic save images in cache directory. have done in project move images cache directory sdcard filemanager plugin using move file function. taking records in sql table including image name , path whenever require load records table.
$scope.$on('$ionicview.beforeenter', function (event, viewdata) { imageservice.loadimages().then(function (list_images) { var list = list_images; angular.merge($scope.showdata, list); }, function (rej) { console.error(rej); }); /* can enter function want call every time when view loads, above did */ });
Comments
Post a Comment