Updated: working version
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
import {
|
||||
Component, View, EventEmitter,
|
||||
CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass
|
||||
CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass, NgStyle
|
||||
} from 'angular2/angular2';
|
||||
|
||||
import {fileUpload} from '../../../components/index';
|
||||
import {FileSelect, FileDrop} from '../../../components/index';
|
||||
import {FileUploader} from '../../../components/file-upload/file-uploader';
|
||||
|
||||
// webpack html imports
|
||||
let template = require('./simple-demo.html');
|
||||
@@ -15,7 +16,18 @@ let template = require('./simple-demo.html');
|
||||
})
|
||||
@View({
|
||||
template: template,
|
||||
directives: [fileUpload, NgClass, CORE_DIRECTIVES, FORM_DIRECTIVES]
|
||||
directives: [FileSelect, FileDrop, NgClass, NgStyle, CORE_DIRECTIVES, FORM_DIRECTIVES]
|
||||
})
|
||||
export class SimpleDemo {
|
||||
private uploader:FileUploader = new FileUploader({url: '/api/'});
|
||||
private hasBaseDropZoneOver:boolean = false;
|
||||
private hasAnotherDropZoneOver:boolean = false;
|
||||
|
||||
private fileOverBase(e:any) {
|
||||
this.hasBaseDropZoneOver = e;
|
||||
}
|
||||
|
||||
private fileOverAnother(e:any) {
|
||||
this.hasAnotherDropZoneOver = e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user