bcabanes / ng-camera

AngularJS directive for capturing images form your computer's camera.
55 stars 33 forks source link

Added callback function attribute to call outside of the directive to return image data #13

Open MikhailRoot opened 8 years ago

MikhailRoot commented 8 years ago

Outer callback specified to return image data right after capturing to avoid explicit watcher on model in controllers where used this directive. In my case it's done to get image data and allow to store them in array of captured images outside the directive. //example callback in controller implementation vm.images=[]; vm.recievePhoto=function(photo){ vm.images.push(photo); } also updated to run with angular 1.5 because in previous version i got error, can't load module.