in viewport change event anuglar code example
Example 1: typescript on window resize
@HostListener('window:resize', ['$event'])
onResize(event) {
event.target.innerWidth;
}
Example 2: how to run resize event only on client side angular
@HostListener('window:resize', ['$event'])
onResize(event) {
if(window){
let a=window.innerWidth;
}
}