Thursday, 23 August 2018

ngif to check null, undefined and empty + angular 5

<ng-template pTemplate="body" let-rowData let-columns="columns">
                <tr style="height:110px">
                    <td *ngFor="let col of columns" [style.width]="col.width" >
                        <div *ngIf = "rowData[col?.field] != ''">
                                {{rowData[col?.field] || rowData.Control[col?.field] || rowData.Turbo[col?.field]}}
                        </div>
                    </td>
                </tr>
            </ng-template>

No comments:

Post a Comment

How to get the value from web.config(if any value assign as static Key)

Web.Config File:   <appSettings>     <add key="DomainName" value="PW" />     </appSettings> Cl...