Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122107112
dialog.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 15, 19:55
Size
1 KB
Mime Type
text/x-java
Expires
Thu, Jul 17, 19:55 (2 d)
Engine
blob
Format
Raw Data
Handle
27435549
Attached To
rSVGTESTAPP svg-test-app
dialog.component.ts
View Options
import {Component, Inject, Injectable} from '@angular/core';
import { MatDialogRef, MatIconModule, MAT_DIALOG_DATA } from '@angular/material';
@Component({
selector: 'dialog-component',
templateUrl: './dialog.component.html',
styleUrls: ['./dialog.component.css']
})
@Injectable()
export class DialogComponent {
// DEFAULT values in case there is no initialContent or button text passed from app
initialContent = 'Loading data for entity ...';
cancelButtonText = 'close';
constructor(
@Inject(MAT_DIALOG_DATA) private data: any,
private dialogRef: MatDialogRef<DialogComponent>) {
//
// in case there is no data/initialContent passed the default this.initialContent will be displayed- Same for button text.
//
if (data) {
this.initialContent = data.message || this.initialContent;
if (data.buttonText) {
this.cancelButtonText = data.buttonText.cancel || this.cancelButtonText;
}
}
this.dialogRef.updateSize('1200vw', '800vw');
}
onConfirmClick(): void {
this.dialogRef.close(true);
}
}
Event Timeline
Log In to Comment