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.
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.