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
- Host: GitHub
- URL: https://github.com/ymyang/ng-filedrop
- Owner: ymyang
- Created: 2015-10-14T00:56:49.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-15T06:56:30.000Z (almost 10 years ago)
- Last Synced: 2025-08-29T21:48:41.740Z (11 months ago)
- Topics: angular, file-drop
- Language: JavaScript
- Size: 53.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);
};
});
```