我有MatDialog的当前工作示例,我想用MatMenuItem替换它。
这是当前触发“材质对话框”的代码
HTML:
<button mat-icon-button
(click)="openTheBox()">
<mat-icon >
Click
</mat-icon>
</button>
TS:
openTheBox() {
this.dialog.open(ButtonifierBox, {width: '800px'})
.afterClosed()
.subscribe(() => {
});
this.trigger.openMenu();
}
代替使用:
this.dialog.open(ButtonifierBox) // ButtonifierBox是另一个HTML块的选择器
我要使用:
this.trigger.openMenu();