Delete Image from gallery


I need to add an option to my app to delete a photo after selecting it from the gallery. How should I go about implementing this with ionic / cordova / angularjs setup??


window.resolveLocalFileSystemURL(the_path, function (result) { result.remove(function(){ //removed }); });

Note: prepend “file://” to the_path


For me it doesn’t work. I tested it on android. The method is completed succesfully, but the image is not removed from the gallery.
Any suggestion?