1
|
import { Component, Input } from '@angular/core';
|
2
|
import { MatDialog } from '@angular/material';
|
3
|
import { ProfileSettingsComponent } from '../profile-settings/profile-settings.component';
|
4
|
|
5
|
@Component({
|
6
|
selector: 'app-header',
|
7
|
templateUrl: './header.component.html',
|
8
|
styleUrls: ['./header.component.sass']
|
9
|
})
|
10
|
export class HeaderComponent {
|
11
|
@Input() name = 'John Doe';
|
12
|
|
13
|
constructor(private dialog: MatDialog) { }
|
14
|
|
15
|
onProfileClick(): void {
|
16
|
this.dialog.open(ProfileSettingsComponent, {
|
17
|
data: {
|
18
|
}
|
19
|
});
|
20
|
}
|
21
|
}
|