Angular Material

This commit is contained in:
Eneko Nieto
2021-01-28 00:41:10 +01:00
parent 58d14838ec
commit 3dff20f9d6
6 changed files with 69 additions and 35 deletions

View File

@@ -1,13 +1,15 @@
<div>
<img src="/assets/img/logo.png" />
<div *ngIf="name; then thenBlock; else elseBlock"></div>
<ng-template #thenBlock>
{{ name }}
<button class="btn btn-default" (click)="logout()">Logout</button>
</ng-template>
<ng-template #elseBlock>
<button class="btn btn-default" (click)="login()">Login</button>
</ng-template>
</div>
<mat-grid-list cols="4" rowHeight="4:1">
<mat-grid-tile colspan="3" rowspan="4">
<img width="100%" src="/assets/img/logo.png" />
</mat-grid-tile>
<mat-grid-tile colspan="1" rowspan="2">
<div *ngIf="name; then thenBlock; else elseBlock"></div>
<ng-template #thenBlock>
{{ name }}
<button mat-raised-button class="btn btn-default" (click)="logout()">Logout</button>
</ng-template>
<ng-template #elseBlock>
<button mat-raised-button class="btn btn-default" (click)="login()">Login</button>
</ng-template>
</mat-grid-tile>
</mat-grid-list>