My issue involves working with a combination of HTML and TypeScript.
<ion-card class="ionCard" *ngFor="let item of libraries">
<ion-card-header>
{{getLibraryName(item.locationName)}}
</ion-card-header>
<ion-card-content>
<label>{{item.occupiedSeats}} out of {{item.freeSeats + item.occupiedSeats}}</label>
<div class="progressBar">
<div class="progressBarFilled" style="width:50%"></div>
</div>
</ion-card-content>
</ion-card>
In the div with the class= progressBarFilled
, I am setting a fixed width. I want to make this width dynamic instead. Ideally, I would like to set it as
width = {{item.occupiedSeats/item.freeSeats}}
.
Is there a way to achieve this dynamically?