Skip to content

Instantly share code, notes, and snippets.

@danielkuhlwein
Last active September 12, 2018 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielkuhlwein/fe6fc61664882bf4505b2e4ce4330437 to your computer and use it in GitHub Desktop.
Save danielkuhlwein/fe6fc61664882bf4505b2e4ce4330437 to your computer and use it in GitHub Desktop.
Hiding the Action Button
<!-- Action Column -->
<ng-container matColumnDef="action" class="mat-column-action">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let element" class="d-sm-flex">
<mat-menu #buttonDropdown="matMenu">
<button mat-menu-item>
<mat-icon>file_download</mat-icon>Download Handouts</button>
</mat-menu>
<!-- Put the if expression on this button: -->
<button mat-icon-button [matMenuTriggerFor]="buttonDropdown" *ngIf="expression">
<mat-icon>more_vert</mat-icon>
</button>
</mat-cell>
</ng-container>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment