upload event in the demo

This commit is contained in:
Mario Romano 2016-05-20 18:25:27 +01:00
parent 429f082eb7
commit 5c8e37073f
3 changed files with 20 additions and 10 deletions

View File

@ -116,8 +116,9 @@ export class MyDemoApp {
constructor(alfrescoSettingsService: AlfrescoSettingsService) {
alfrescoSettingsService.host = 'http://myalfrescoip';
}
customMethod(event: Object) {
console.log('File uploaded');
public customMethod(event: Object): void {
console.log('File uploaded');
}
}
@ -172,8 +173,9 @@ export class MyDemoApp {
constructor(alfrescoSettingsService: AlfrescoSettingsService) {
alfrescoSettingsService.host = 'http://myalfrescoip';
}
customMethod(event: Object) {
console.log('File uploaded');
public customMethod(event: Object): void {
console.log('File uploaded');
}
}

View File

@ -7,7 +7,8 @@
"scripts": {
"postinstall": "npm run build && npm run typings",
"typings": "typings install",
"start": "rm -rf dist && npm install && http-server -c-1 -o -p 8875 .",
"start": "rm -rf dist && npm install && npm run server",
"server" : "http-server -c-1 -o -p 8875 .",
"build": "rm -rf dist && tsc"
},
"license": "MIT",

View File

@ -29,7 +29,8 @@ import { ALFRESCO_ULPOAD_COMPONENT, UploadService } from 'ng2-alfresco-upload/ng
template: `<alfresco-upload-button [showDialogUpload]="true"
[showUdoNotificationBar]="true"
[uploadFolders]="false"
[multipleFiles]="false">
[multipleFiles]="false"
(onSuccess)="customMethod($event)">
</alfresco-upload-button>
<br><br>
@ -37,7 +38,8 @@ import { ALFRESCO_ULPOAD_COMPONENT, UploadService } from 'ng2-alfresco-upload/ng
<alfresco-upload-button [showDialogUpload]="true"
[showUdoNotificationBar]="true"
[uploadFolders]="true"
[multipleFiles]="false">
[multipleFiles]="false"
(onSuccess)="customMethod($event)">
</alfresco-upload-button>
<br><br>
@ -45,12 +47,13 @@ import { ALFRESCO_ULPOAD_COMPONENT, UploadService } from 'ng2-alfresco-upload/ng
<alfresco-upload-button [showDialogUpload]="true"
[showUdoNotificationBar]="true"
[uploadFolders]="false"
[multipleFiles]="true">
[multipleFiles]="true"
(onSuccess)="customMethod($event)">
</alfresco-upload-button>
<br><br>
<alfresco-upload-drag-area [showDialogUpload]="true" >
<alfresco-upload-drag-area [showDialogUpload]="true" (onSuccess)="customMethod($event)" >
<div style="width: 200px; height: 100px; border: 1px solid #888888">
DRAG HERE
</div>
@ -59,7 +62,11 @@ import { ALFRESCO_ULPOAD_COMPONENT, UploadService } from 'ng2-alfresco-upload/ng
})
export class MyDemoApp {
constructor(alfrescoSettingsService: AlfrescoSettingsService) {
alfrescoSettingsService.host = 'http://192.168.99.100:2323';
alfrescoSettingsService.host = 'http://192.168.99.100:8080';
}
public customMethod(event: Object): void {
console.log('File uploaded');
}
}