diff --git a/src/app/login-screen/login-screen.component.ts b/src/app/login-screen/login-screen.component.ts index 0ff372808d653ea222267bcb9c59a0a269e72125..d101841a99a49230765a5b874bdd8436ad4466e6 100644 --- a/src/app/login-screen/login-screen.component.ts +++ b/src/app/login-screen/login-screen.component.ts @@ -1,5 +1,5 @@ -import { Component, Inject, NgModule, OnInit } from '@angular/core'; -import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material'; +import { Component, OnInit } from '@angular/core'; +import { MatDialog } from '@angular/material'; import { RegisterComponent } from '../register/register.component'; import { PasswordResetComponent } from '../password-reset/password-reset.component'; @@ -10,6 +10,8 @@ import { PasswordResetComponent } from '../password-reset/password-reset.compone }) export class LoginScreenComponent implements OnInit { + result: any; + constructor(public dialog: MatDialog) { } @@ -17,12 +19,22 @@ export class LoginScreenComponent implements OnInit { const registerDialogRef = this.dialog.open(RegisterComponent, { width: '350px' }); + + registerDialogRef.afterClosed().subscribe(result => { + console.log('RegisterDialog was closed'); + this.result = result; + }); } openPasswordDialog(): void { const passwordResetDialogRef = this.dialog.open(PasswordResetComponent, { width: '350px' }); + + passwordResetDialogRef.afterClosed().subscribe(result => { + console.log('PasswordResetDialog was closed'); + this.result = result; + }); } ngOnInit() {