File
Metadata
styleUrls |
./superadmin-password-request.component.css |
templateUrl |
./superadmin-password-request.component.html |
Constructor
constructor(data: string)
|
|
Parameters :
Name |
Type |
Optional |
data |
string
|
No
|
|
Public
data
|
Type : string
|
Decorators :
@Inject(MAT_DIALOG_DATA)
|
|
passwordform
|
Default value : new FormGroup({
pw: new FormControl('', [Validators.required, Validators.minLength(3)])
})
|
|
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Component, Inject } from '@angular/core';
import { FormGroup, Validators, FormControl } from '@angular/forms';
@Component({
templateUrl: './superadmin-password-request.component.html',
styleUrls: ['./superadmin-password-request.component.css']
})
export class SuperadminPasswordRequestComponent {
passwordform = new FormGroup({
pw: new FormControl('', [Validators.required, Validators.minLength(3)])
});
constructor(
@Inject(MAT_DIALOG_DATA) public data: string
) { }
}
<form [formGroup]="passwordform">
<h1 mat-dialog-title>Sicherheitsabfrage Kennwort</h1>
<mat-dialog-content>
<div class="infobox">
<p>Für die Funktion "{{data}}" ist es zur Sicherheit notwendig, dass Sie Ihr Kennwort nocheinmal eingeben.</p>
</div>
<p>
<mat-form-field class="full-width">
<input matInput type="password" formControlName="pw" placeholder="Kennwort">
</mat-form-field>
</p>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-raised-button color="primary" type="submit" [mat-dialog-close]="passwordform" [disabled]="passwordform.invalid">Bestätigen</button>
<button mat-raised-button [mat-dialog-close]="false">Abbrechen</button>
</mat-dialog-actions>
</form>
Legend
Html element with directive