Can someone provide guidance on how to make an icon appear or disappear based on the logic within [ngIf]? The icon should only be displayed if there is information in a specific field. Should I implement this inside ngIF or in my TS file? Can the icon class be used for this purpose, or do I need to create a method?
<ng-template [ngIf]="item.valor == null || item.valor.length < 199" [ngIfElse]="segundaParte">
<div class="detalha" fxFlex="auto" fxFlex.gt-xs="33%" fxFlex.lt-sm="100%" fxFlex.gt-sm="33.3%">
<h3 tabindex="0" class="item__titulo">{{item.objCampo.label}}</h3>
<span tabindex="0" class="item__detalhar-conteudo item__detalhar-space">
<ng-template [ngIf]="item.mascara === 2" [ngIfElse]="valorObjeto">
<a href="{{ linkItens(item.valor) }}" class="border-item-detalhe" matTooltip="Ver processos" matTooltipPosition="right" target="_blank">
<span class="item__detalhar-item-valor" [innerHTML]="item.valor | mascarasCampos:item.mascara"></span>
<span class="material-icons item__detalhar-icon-detalhe">open_in_new</span> (Icon appears here)
</a>
</ng-template>
<ng-template #valorObjeto>
<span class="item__detalhar-item-valor" [innerHTML]="item.valor | mascarasCampos:item.mascara"></span>
<span class="material-icons item__detalhar-icon-detalha"></span>
</ng-template>
</span>
</div>
</ng-template>