Skip to content
Snippets Groups Projects
Verified Commit e01ada75 authored by Lukas Mauß's avatar Lukas Mauß Committed by Lukas Maximilian Kimpel
Browse files

Create password-reset dialog

Register PasswordResetDialog as EntryComponent so that it can be loaded into a dialog
Add password-reset dialog
parent dca5d15b
Branches
Tags
No related merge requests found
...@@ -57,7 +57,8 @@ import { NotificationService } from './notification.service'; ...@@ -57,7 +57,8 @@ import { NotificationService } from './notification.service';
RegisterComponent RegisterComponent
], ],
entryComponents: [ entryComponents: [
RegisterComponent RegisterComponent,
PasswordResetComponent
], ],
imports: [ imports: [
AppRoutingModule, AppRoutingModule,
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
</div> </div>
<div fxLayout="row" fxLayoutGap="5px"> <div fxLayout="row" fxLayoutGap="5px">
<button mat-raised-button color="primary" (click)="openRegisterDialog()">Register</button> <button mat-raised-button color="primary" (click)="openRegisterDialog()">Register</button>
<button mat-raised-button color="primary">Password reset</button> <button mat-raised-button color="primary" (click)="openPasswordDialog()">Password reset</button>
</div> </div>
</div> </div>
import { Component, Inject, NgModule, OnInit } from '@angular/core'; import { Component, Inject, NgModule, OnInit } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material'; import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material';
import { RegisterComponent } from '../register/register.component'; import { RegisterComponent } from '../register/register.component';
import { PasswordResetComponent } from '../password-reset/password-reset.component';
@Component({ @Component({
selector: 'app-login-screen', selector: 'app-login-screen',
...@@ -9,11 +10,17 @@ import { RegisterComponent } from '../register/register.component'; ...@@ -9,11 +10,17 @@ import { RegisterComponent } from '../register/register.component';
}) })
export class LoginScreenComponent implements OnInit { export class LoginScreenComponent implements OnInit {
constructor(public registerDialog: MatDialog) { constructor(public dialog: MatDialog) {
} }
openRegisterDialog(): void { openRegisterDialog(): void {
const registerDialogRef = this.registerDialog.open(RegisterComponent, { const registerDialogRef = this.dialog.open(RegisterComponent, {
width: '350px'
});
}
openPasswordDialog(): void {
const passwordDialogref = this.dialog.open(PasswordResetComponent, {
width: '350px' width: '350px'
}); });
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment