Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F66740761
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
Wed, Jun 12, 18:30
Size
1 KB
Mime Type
text/x-java
Expires
Fri, Jun 14, 18:30 (2 d)
Engine
blob
Format
Raw Data
Handle
18270498
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