A photo capture directive for angularjs