mirror of https://github.com/ghostfolio/ghostfolio
4 changed files with 7 additions and 24 deletions
@ -1,37 +1,22 @@ |
|||||
import { |
import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; |
||||
ChangeDetectionStrategy, |
|
||||
Component, |
|
||||
Inject, |
|
||||
OnDestroy |
|
||||
} from '@angular/core'; |
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
||||
import { Subject } from 'rxjs'; |
|
||||
|
|
||||
import { SubscriptionInterstitialDialogParams } from './interfaces/interfaces'; |
import { SubscriptionInterstitialDialogParams } from './interfaces/interfaces'; |
||||
|
|
||||
@Component({ |
@Component({ |
||||
|
changeDetection: ChangeDetectionStrategy.OnPush, |
||||
host: { class: 'd-flex flex-column flex-grow-1 h-100' }, |
host: { class: 'd-flex flex-column flex-grow-1 h-100' }, |
||||
selector: 'gf-subscription-interstitial-dialog', |
selector: 'gf-subscription-interstitial-dialog', |
||||
changeDetection: ChangeDetectionStrategy.OnPush, |
|
||||
styleUrls: ['./subscription-interstitial-dialog.scss'], |
styleUrls: ['./subscription-interstitial-dialog.scss'], |
||||
templateUrl: 'subscription-interstitial-dialog.html' |
templateUrl: 'subscription-interstitial-dialog.html' |
||||
}) |
}) |
||||
export class SubscriptionInterstitialDialog implements OnDestroy { |
export class SubscriptionInterstitialDialog { |
||||
private unsubscribeSubject = new Subject<void>(); |
|
||||
|
|
||||
public constructor( |
public constructor( |
||||
@Inject(MAT_DIALOG_DATA) public data: SubscriptionInterstitialDialogParams, |
@Inject(MAT_DIALOG_DATA) public data: SubscriptionInterstitialDialogParams, |
||||
public dialogRef: MatDialogRef<SubscriptionInterstitialDialog> |
public dialogRef: MatDialogRef<SubscriptionInterstitialDialog> |
||||
) {} |
) {} |
||||
|
|
||||
public ngOnInit() {} |
|
||||
|
|
||||
public onCancel() { |
public onCancel() { |
||||
this.dialogRef.close({}); |
this.dialogRef.close({}); |
||||
} |
} |
||||
|
|
||||
public ngOnDestroy() { |
|
||||
this.unsubscribeSubject.next(); |
|
||||
this.unsubscribeSubject.complete(); |
|
||||
} |
|
||||
} |
} |
||||
|
Loading…
Reference in new issue