Quantcast
Channel: Angular window resize event - Stack Overflow
Viewing all articles
Browse latest Browse all 20

Angular window resize event

$
0
0

I would like to perform some tasks based on the window re-size event (on load and dynamically).

Currently I have my DOM as follows:

<div id="Harbour"><div id="Port" (window:resize)="onResize($event)" ><router-outlet></router-outlet></div></div>

The event correctly fires

export class AppComponent {    onResize(event) {        console.log(event);    }}

How do I retrieve the Width and Height from this event object?

Thanks.


Viewing all articles
Browse latest Browse all 20

Latest Images

Trending Articles



Latest Images