Serial
返回*ngIf="cards[i].vm_type === 'Container Provider'"
时,我无法看到True
选项我不确定我在这里做错了什么。
<button mat-raised-button color="primary" [disabled]="(cards[i].state == 'stopped')" [matMenuTriggerFor]="appMenu">Connect</button>
<mat-menu #appMenu="matMenu">
<button *ngIf="cards[i].vm_type === 'Bhyve'" mat-menu-item color="primary" [disabled]="(!cards[i].vnc || cards[i].state === 'stopped')" (click)="vnc(i)">VNC</button>
<button *ngIf="cards[i].vm_type === 'Bhyve'" mat-menu-item color="primary" [disabled]="(cards[i].state === 'stopped')" (click)="serial(i)">Serial</button>
</mat-menu>
<mat-menu #appMenu="matMenu">
<button *ngIf="cards[i].vm_type === 'Container Provider'" mat-menu-item color="primary" [disabled]="(cards[i].state === 'stopped')" (click)="serial(i)">Serial</button>
</mat-menu>
答案 0 :(得分:1)
NVM我明白了
<button *ngIf="cards[i].vm_type === 'Bhyve'" mat-raised-button color="primary" [disabled]="(cards[i].state == 'stopped')" [matMenuTriggerFor]="appMenu">Connect</button>
<mat-menu #appMenu="matMenu">
<button mat-menu-item color="primary" [disabled]="(!cards[i].vnc || cards[i].state === 'stopped')" (click)="vnc(i)">VNC</button>
<button mat-menu-item color="primary" [disabled]="(cards[i].state === 'stopped')" (click)="serial(i)">Serial</button>
</mat-menu>
<button *ngIf="cards[i].vm_type === 'Container Provider'" mat-raised-button color="primary" [disabled]="(cards[i].state == 'stopped')" [matMenuTriggerFor]="appMenu2">Connect</button>
<mat-menu #appMenu2="matMenu">
<button mat-menu-item color="primary" [disabled]="(cards[i].state === 'stopped')" (click)="serial(i)">Serial</button>
</mat-menu>