An open API service indexing awesome lists of open source software.

https://github.com/ymyang/ng-filedrop

file drop directive for angular
https://github.com/ymyang/ng-filedrop

angular file-drop

Last synced: 6 months ago
JSON representation

file drop directive for angular

Awesome Lists containing this project

README

          

# ng-fileDrop
file drop directive for angular

# 使用

```javascript

window.ondragover = function(e) {
e.preventDefault();
return false;
};
window.ondrop = function(e) {
e.preventDefault();
return false;
};

angular.module('app', ['ng-fileDrop']).controller('AppCtrl', function($scope, $log) {

$scope.ondrop = function(files) {
$log.debug('ondrop:', files);
};

});

```