I have a number (number of slots) in my application.
by using this number value i need to iterate a div in html inside div i am going to display button.
**in simple words:**if numberOfSlots is 12 i need to create 12 button in html
but in angular *ngFor will only allow array to iterate.
<form [formGroup]="staffAddForm" name='staffAddForm' novalidate *ngIf="staffAddForm">
<div class="col-md-9" formArrayName="staffs">
<div *ngFor="let data of staffAddForm.controls['staffs'].controls; let i = index" [formGroupName]="i">
<div class="col-md-12">
<app-synap-ch [chId]="'user' + '_' + i"
[formName]="data.controls['staff']"
(notifyClickCheckBox)="changeNewStaff($event, i, data)">
</app-synap-ch>
<div *ngFor="let item of appointmentsData.numberofSlots; let j = index">
<button (click) = "getValue()">j+1</button>
</div>
</div>
</div>
</form>