so I have a pretty large component, that I am trying to make it as DRY as possible. However, I haven't found an easier way to do this: The parent is showing a list of child components, chat messages that I have active, and they can have three states:
- unread and urgent unread and normal
- read(no new messages)
- no new messages
<ion-grid>
<ng-container *ngIf="unreadAndUrgent; else normal">
<ion-row class="urgent">
<!-- about 30-40 lines of further structuring -->
</ion-row>
</ng-container>
<ng-template #normal>
<ion-row [class]="unreadNormalMessages ? 'normal-css' : '' ">
<!-- same 30-40 lines of further structuring as above -->
</ion-row>
</ng-template>
</ion-grid>
as you can see I am essentially repeating the same code as above which just makes it very bloated in the end and I am trying to cut it down so that it can be more DRY. Any suggestions? thanks!