angularjs/ node.js/ mean-stack
how to delete folder with angular.js?
I tried this angular-filesystem
I set up that plugin in my app. everything is ok but when I press delete button, I'm getting this error: Object {text: "Error getting directory", obj: FileError}
this is my path directory:
var path = 'http://localhost:3001/uploads/audios/';
When you define your module, write the deletefolder method in $scope as below
$scope.deleteFolder = function(path, recursive) {
fileSystem.deleteFolder(path, recursive).then(function() {
$scope.messages.push(path + " deleted");
}, function(err) {
console.log(err);
$window.alert(err.text);
});
};
and call it in any event of a element as below
ng-click='deleteFolder("documents/", true)'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.