@HostListener
lets you listen for events on the host element or component.
This is a function decorator that accepts an event name as an argument. When that event gets fired on the host element it calls the associated function.
Consider:
@HostListener('window:resize', ['$event'])
onResize(event: any) {
this.calculateBodyHeight();
}