From e506490f81ad086533f0dc611e43e529540bca9c Mon Sep 17 00:00:00 2001 From: mauriziovitale84 Date: Thu, 2 Jun 2016 12:38:22 +0100 Subject: [PATCH] #129 Fixed change detector --- .../src/components/file-uploading-dialog.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts index 63f689d3e2..b32a97ba81 100644 --- a/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts +++ b/ng2-components/ng2-alfresco-upload/src/components/file-uploading-dialog.component.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { Component } from 'angular2/core'; +import { Component, ChangeDetectorRef } from 'angular2/core'; import { FileModel } from '../models/file.model'; import { FileUploadingListComponent } from './file-uploading-list.component'; import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core'; @@ -51,13 +51,15 @@ export class FileUploadingDialogComponent { private _isDialogMinimized: boolean = false; - constructor(private _uploaderService: UploadService) {} + constructor(private cd: ChangeDetectorRef, + private _uploaderService: UploadService) {} ngOnInit() { this._uploaderService.filesUpload$.subscribe((fileList: FileModel[]) => { this.filesUploadingList = fileList; if (this.filesUploadingList.length > 0) { this.isDialogActive = true; + this.cd.detectChanges(); } }); }