Answers for "window.onresize angular"

-1

div resize event typescript

resizeObservable$: Observable<Event>
resizeSubscription$: Subscription

ngOnInit() {
    this.resizeObservable$ = fromEvent(window, 'resize')
    this.resizeSubscription$ = this.resizeObservable$.subscribe( evt => {
      console.log('event: ', evt)
    })
}
Posted by: Guest on May-21-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language