I have a formarrayName, and here if the data is empty i want a text to dislay saying "Data is empty" If there is data then data must be shown by hiding the text. Can anyone help me to solve that?
HTML:
<div id="Emergency" class="tab-pane fade">
<div formArrayName="itemRows">
<div class="col-lg-12 col-md-12 col-sm-12 col-12 no-padd pt-4 lastForm" *ngFor="let itemrow of Form.get('itemRows').controls;let i = index;"
[formGroupName]="i">
</div>
</div>
</form>
</div>
you can use .length
fot this issue
<div *ngIf="Form.get('itemRows').controls.length===0">
Data is empty
</div>