cpiock cpiock - 3 months ago 12
TypeScript Question

How to get current document size in angular2

How can I get the current document size of a page in angular2. With jquery I made this

$(document).width()


Thanks for help

Answer

the following line of code will do the work:

document.body.clientWidth;