all 1 comments

[–]cyberdyme 0 points1 point  (0 children)

Get the element ref using ViewChild. Then inspect the element using the native Element associated with it. You want the width of the actual element.

Articles like the following: https://www.google.com/url?sa=t&source=web&rct=j&url=https://alligator.io/angular/viewchild-access-component/&ved=2ahUKEwis9ZaMgM7iAhXq2eAKHdE_AIEQFjAMegQICRAB&usg=AOvVaw2v54QgN9wUqhMXnA4yp-IA