- build process updated - systemjs bundler added BREAKING CHANGES: - directives and selectors renamed to ng2FileSelect and ng2FileDrop
29 lines
873 B
TypeScript
29 lines
873 B
TypeScript
import {Component} from '@angular/core';
|
|
import {CORE_DIRECTIVES, FORM_DIRECTIVES, NgClass, NgStyle} from '@angular/common';
|
|
import {FILE_UPLOAD_DIRECTIVES, FileUploader} from '../../../ng2-file-upload';
|
|
|
|
// webpack html imports
|
|
let template = require('./simple-demo.html');
|
|
|
|
// const URL = '/api/';
|
|
const URL = 'https://evening-anchorage-3159.herokuapp.com/api/';
|
|
|
|
@Component({
|
|
selector: 'simple-demo',
|
|
template: template,
|
|
directives: [FILE_UPLOAD_DIRECTIVES, NgClass, NgStyle, CORE_DIRECTIVES, FORM_DIRECTIVES]
|
|
})
|
|
export class SimpleDemoComponent {
|
|
public uploader:FileUploader = new FileUploader({url: URL});
|
|
public hasBaseDropZoneOver:boolean = false;
|
|
public hasAnotherDropZoneOver:boolean = false;
|
|
|
|
public fileOverBase(e:any):void {
|
|
this.hasBaseDropZoneOver = e;
|
|
}
|
|
|
|
public fileOverAnother(e:any):void {
|
|
this.hasAnotherDropZoneOver = e;
|
|
}
|
|
}
|