mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
#129 Fixed change detector
This commit is contained in:
parent
3abee3c8ac
commit
e506490f81
@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component } from 'angular2/core';
|
import { Component, ChangeDetectorRef } from 'angular2/core';
|
||||||
import { FileModel } from '../models/file.model';
|
import { FileModel } from '../models/file.model';
|
||||||
import { FileUploadingListComponent } from './file-uploading-list.component';
|
import { FileUploadingListComponent } from './file-uploading-list.component';
|
||||||
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
import { AlfrescoPipeTranslate } from 'ng2-alfresco-core/dist/ng2-alfresco-core';
|
||||||
@ -51,13 +51,15 @@ export class FileUploadingDialogComponent {
|
|||||||
|
|
||||||
private _isDialogMinimized: boolean = false;
|
private _isDialogMinimized: boolean = false;
|
||||||
|
|
||||||
constructor(private _uploaderService: UploadService) {}
|
constructor(private cd: ChangeDetectorRef,
|
||||||
|
private _uploaderService: UploadService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this._uploaderService.filesUpload$.subscribe((fileList: FileModel[]) => {
|
this._uploaderService.filesUpload$.subscribe((fileList: FileModel[]) => {
|
||||||
this.filesUploadingList = fileList;
|
this.filesUploadingList = fileList;
|
||||||
if (this.filesUploadingList.length > 0) {
|
if (this.filesUploadingList.length > 0) {
|
||||||
this.isDialogActive = true;
|
this.isDialogActive = true;
|
||||||
|
this.cd.detectChanges();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user