I am trying to get the width of an element using JS in my Angular app.
document.getElementsByClassName("element")[0].offsetWidth;
When I do this i am getting the below compilation error
Property 'of fsetWidth' does not exist on type 'Element'.
Could someone tell me how to use it in Angular 4. Thanks