How to use the @angular/material.MdDialogConfig function in @angular/material

To help you get started, we’ve selected a few @angular/material examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Vintharas / talk-angular-material / src / app / app.component.ts View on Github external
openDialog(){
    // dialog config
    const config = new MdDialogConfig();
    config.viewContainerRef = this.vcr;
    // open dialog
    this.dialog.open(SettingsDialogComponent, config);
  }
github Vintharas / talk-angular-material / src / app / app.component.ts View on Github external
addMessage(){
    // dialog config
    const config = new MdDialogConfig();
    config.viewContainerRef = this.vcr;
    // open dialog
    this.dialog.open(MessageDialogComponent, config);
  }
github groovylabs / lyre / modules / lyredeck / src / app / app.component.ts View on Github external
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;
                }
github hfreire / get-me-a-date / src / web / app / recommendations / recommendations-list / recommendations-list.component.ts View on Github external
.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 ]))
          })
      })
  }
github alexjlockwood / ShapeShifter / src / app / components / dialogs / dialog.service.ts View on Github external
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();
  }
github sebastianhaas / medical-appointment-scheduling / src / app / appointment / patient.component.ts View on Github external
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;
    });
  }
github alexjlockwood / ShapeShifter / src / app / components / dialogs / dialog.service.ts View on Github external
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();
  }
}
github onehungrymind / ng2-multi-step-form / src / app / forms / summary / summary.component.ts View on Github external
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'))
  }
}