Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
openDialog(){
// dialog config
const config = new MdDialogConfig();
config.viewContainerRef = this.vcr;
// open dialog
this.dialog.open(SettingsDialogComponent, config);
}
addMessage(){
// dialog config
const config = new MdDialogConfig();
config.viewContainerRef = this.vcr;
// open dialog
this.dialog.open(MessageDialogComponent, config);
}
connectToServer(): void {
console.log("inside on method connectToServer");
console.log("this.storageService = " + this.storageService.getItem("rememberMe"));
if (this.storageService.getItem("rememberMe") == 'false') {
let dialogConfig = new MdDialogConfig();
dialogConfig.width = '320px';
dialogConfig.height = '320px';
dialogConfig.data = {
host: 'http://localhost:8243/lyre',
rememberMe:
false
};
let dialogRef = this.dialog.open(DialogServerConnect, dialogConfig);
dialogRef.afterClosed().subscribe(result => {
if (typeof result === 'undefined') {
result = {};
result.rememberMe = false;
}
.subscribe((recommendation) => {
const config = new MdDialogConfig()
config.width = '450px'
config.data = { recommendation }
this._dialog = this.dialog.open(RecommendationDialogComponent, config)
this._dialog.afterClosed()
.subscribe(() => {
this._recommendations.getValue()[ index ] = _.pick(config.data.recommendation, _.keys(this._recommendations.getValue()[ index ]))
})
})
}
confirm(
viewContainerRef: ViewContainerRef,
title: string,
message: string): Observable {
const config = new MdDialogConfig();
config.viewContainerRef = viewContainerRef;
const dialogRef = this.dialog.open(ConfirmDialogComponent, config);
dialogRef.componentInstance.title = title;
dialogRef.componentInstance.message = message;
return dialogRef.afterClosed();
}
public openCancelAppointmentDialog(appointment: Appointment) {
let config = new MdDialogConfig();
config.viewContainerRef = this.viewContainerRef;
this.dialogRef = this.dialog.open(PatientCancelAppointmentDialog, config);
this.dialogRef.afterClosed().subscribe(result => {
if (result === 'yes') {
this.cancelAppointment(appointment);
}
this.dialogRef = null;
});
}
demo(viewContainerRef: ViewContainerRef, demoTitles: string[]): Observable {
const config = new MdDialogConfig();
config.viewContainerRef = viewContainerRef;
const dialogRef = this.dialog.open(DemoDialogComponent, config);
dialogRef.componentInstance.demoTitles = demoTitles;
return dialogRef.afterClosed();
}
}
openDialog() {
let config = new MdDialogConfig();
config.viewContainerRef = this.viewContainerRef;
this.dialogRef = this.dialog.open(SuccessDialogComponent, config);
this.dialogRef.afterClosed()
.subscribe(event => this.router.navigateByUrl('user'))
}
}