as shown below in the code, i have a modal and i set the values of the width and height programatically.
this._InsecProdPropService.startWSToGetAllSubCultures(this.prodCode)
results in setting *ngIf="showSubCulturesSelectionList"
to true
, which consequently results in showning a selection list.
my question is, how can i get the width and height of that selection list once it is drawn on the screen programmatically? in other words, i would like to have something like two-way binding on the width and height attributes of the selection list, because that selectio list will be populated with
different entries differ in width. which means for some entries the width could be 100px
and for others could be larger, hence i would like to bind on the width and height so i can customize the size of the parent/container modal
code:
this.subEvtEmitterForResponseCode = this._InsecProdPropService.getEvtEmitterForResponseProductCode().subscribe((data)=>{
if (data.length == 0) {
throw new Error('WTF.');
}
if (data.length > 1) {
throw new Error('WTF.');
}
this.prodCode = data[0]['code']
this._InsecProdPropService.startWSToGetAllSubCultures(this.prodCode)
this.width = 150
this.height = 150
})
css code
<div class="modal-content" [style.bottom.px]="width" [style.top.px]="height"> </div>