Skip to content

Commit

Permalink
Updated: readme for demo
Browse files Browse the repository at this point in the history
  • Loading branch information
buchslava committed Oct 16, 2015
1 parent be0c71b commit a117a30
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion components/file-upload/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,48 @@
### Usage
```typescript
import {fileUpload} from 'ng2-file-upload';
import {FileSelect, FileDrop, FileUploader} from 'ng2-file-upload';
```

### Annotations
```typescript
// class FileSelect
@Directive({
selector: '[ng2-file-select]',
properties: ['uploader'],
host: {
'(change)': 'onChange()'
}
})
```

```typescript
// class FileDrop
@Directive({
selector: '[ng2-file-drop]',
properties: ['uploader'],
events: ['fileOver'],
host: {
'(drop)': 'onDrop($event)',
'(dragover)': 'onDragOver($event)',
'(dragleave)': 'onDragLeave($event)'
}
})
```

## FileSelect API

### Properties

- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)

## FileDrop API

### Properties

- `uploader` - (`FileUploader`) - uploader object. See using in [demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts)

### Events

- `file-over` - it fires during 'over' and 'out' events for Drop Area; returns `boolean`: `true` if file is over Drop Area, `false` in case of out.
See using in [ts demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.ts) and
[html demo](https://github.com/valor-software/ng2-file-upload/blob/master/demo/components/file-upload/simple-demo.html)

0 comments on commit a117a30

Please sign in to comment.