refacor(user-update-component): MAT_DIALOG_DATA mit Funktionsinjektion anstelle von Konstruktorinjektion injizieren
This commit is contained in:
parent
2b51fde1fe
commit
ae75e54bdc
@ -1,4 +1,4 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { User } from '../../../models/user-management.api.models';
|
||||
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
|
||||
@ -10,7 +10,10 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
styleUrl: './user-update-form.component.scss'
|
||||
})
|
||||
export class UserUpdateFormComponent {
|
||||
constructor(@Inject(MAT_DIALOG_DATA) data: User) {
|
||||
console.log(data);
|
||||
|
||||
readonly user: User = inject(MAT_DIALOG_DATA);
|
||||
|
||||
constructor() {
|
||||
console.log(this.user)
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user