The div looks like this:
<div #container [ngStyle]=...>
The container is a flexbox row if that matters that contains elements; I need to know if a new element I'm adding to the row is going to fit without causing a wrap.
Thus, my code will sum up the total sizes of each element in the container and compare it with the size of the #container.
The code is like this:
#ViewChild('container') pillContainer: ElementRef;
let maxWidth = this.pillContainer.nativeElement.????
This is where the problem is. I don't think it is offsetWidth because the numbers I was getting back were more like possibly a margin-left. There is no 'width' element though if I look in:
this.pillContainer.nativeElement.attributes. xxxx
I do find and element called (with double quotes) "width", but I didn't see a way of getting the value of that attribute.
Any ideas? Thanks in advance, Yogi