Separating Angular Material cards vertically
.component.html
<ng-container *ngIf="titles?.length; else noTitle">
<mat-card class="my-class-name asd cardPardding" *ngFor="let title of titles">
<p>
{{title}}
</p>
</mat-card>
</ng-container>
<ng-template #noTitle>
<mat-card class="asd cardPardding">
<p>
No title !
</p>
</mat-card>
</ng-template>
.css/.scss file
.my-class-name{
margin-bottom: 10px;
...
}