mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix error when the dialog is not initialized
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, ChangeDetectorRef, OnInit } from '@angular/core';
|
||||
import { Component, ChangeDetectorRef, OnInit, OnDestroy } from '@angular/core';
|
||||
import { FileModel } from '../models/file.model';
|
||||
import { FileUploadingListComponent } from './file-uploading-list.component';
|
||||
import { AlfrescoTranslationService, AlfrescoPipeTranslate } from 'ng2-alfresco-core';
|
||||
@@ -43,7 +43,7 @@ declare let __moduleName: string;
|
||||
host: {'[class.dialog-show]': 'toggleShowDialog'},
|
||||
pipes: [AlfrescoPipeTranslate]
|
||||
})
|
||||
export class FileUploadingDialogComponent implements OnInit {
|
||||
export class FileUploadingDialogComponent implements OnInit, OnDestroy {
|
||||
|
||||
isDialogActive: boolean = false;
|
||||
|
||||
@@ -90,4 +90,8 @@ export class FileUploadingDialogComponent implements OnInit {
|
||||
toggleDialogMinimize() {
|
||||
this._isDialogMinimized = !this._isDialogMinimized;
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.cd.detach();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user