From 77cae6ec7b1b2bb0d1a1d3112f147910467814d0 Mon Sep 17 00:00:00 2001 From: Jan Kuri Date: Thu, 28 Sep 2017 22:28:10 +0200 Subject: [PATCH] chore(demo): update demo to 4.0.0 --- src/components/app-home/app-home.component.html | 4 ++-- src/components/app-home/app-home.component.ts | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/app-home/app-home.component.html b/src/components/app-home/app-home.component.html index 6792dc11..77ab4c78 100644 --- a/src/components/app-home/app-home.component.html +++ b/src/components/app-home/app-home.component.html @@ -22,12 +22,12 @@

My Uploads

-
+

Drag & Drop

your files here or

diff --git a/src/components/app-home/app-home.component.ts b/src/components/app-home/app-home.component.ts index 46f67d03..a6605c93 100644 --- a/src/components/app-home/app-home.component.ts +++ b/src/components/app-home/app-home.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter } from '@angular/core'; -import { UploadOutput, UploadInput, UploadFile, humanizeBytes } from '../../../'; +import { UploadOutput, UploadInput, UploadFile, humanizeBytes, UploaderOptions } from '../../../'; interface FormData { concurrency: number; @@ -17,8 +17,11 @@ export class AppHomeComponent { uploadInput: EventEmitter; humanizeBytes: Function; dragOver: boolean; + options: UploaderOptions; constructor() { + this.options = { concurrency: 1 }; + this.formData = { concurrency: 1, autoUpload: false, @@ -38,8 +41,7 @@ export class AppHomeComponent { type: 'uploadAll', url: 'http://ngx-uploader.com/upload', method: 'POST', - data: { foo: 'bar' }, - concurrency: this.formData.concurrency + data: { foo: 'bar' } }; this.uploadInput.emit(event); @@ -64,8 +66,7 @@ export class AppHomeComponent { type: 'uploadAll', url: 'http://ngx-uploader.com/upload', method: 'POST', - data: { foo: 'bar' }, - concurrency: this.formData.concurrency + data: { foo: 'bar' } }; this.uploadInput.emit(event);