Angular window resize event

Se declara el DIV

onResize(event) {
event.target.innerWidth;
}

or

@HostListener(‘window:resize’, [‘$event’])
onResize(event) {
let width = event.target.innerWidth;
let height = event.target.innerHeight;
}

Supported global targets are window, document, and body.