Я нашел частичное решение. другие предложения?
app.html
<button mat-icon-button [matMenuTriggerFor]="menu" (click)="changeIcon()" #menuTrigger="matMenuTrigger" >
<mat-icon>{{icon}}</mat-icon>
</button>
<mat-menu #menu="matMenu" [overlapTrigger]="false">
<button mat-menu-item>
<span>Log in</span>
</button>
<button mat-menu-item>
<span>Register</span>
</button>
</mat-menu>
и app.ts
import { Component, OnInit, ViewChild, Output, EventEmitter } from '@angular/core';
import { MatMenuTrigger } from '@angular/material/menu';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss']
})
export class HeaderComponent implements OnInit {
@ViewChild(MatMenuTrigger) trigger: MatMenuTrigger;
icon = 'more_vert';
constructor() {
}
ngOnInit() {
}
changeIcon() {
this.trigger.menuClosed.subscribe(() => this.icon = 'more_ver');
this.trigger.menuOpened.subscribe(() => this.icon = 'close');
}
}