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.

Related Question How to delete multiple rows from table using Angular.js? How to delete a particular row properly using Angular.js/Javascript How to delete objects present in array in angular.js how to delete angular.js v 1.3 cookies on tab close To save file in specific folder in angular.js Delete the record by AutoNumber field with angular.js Delete and get by ID Angular.js and Servlet Can't delete objects with angular.js Angular.js delete resource with parameter How to minify angular.js?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM