How to use EventManager to listen to window.resize events in angular?
问题 I'm borrowing some code from this stackoverflow: Angular window resize event The author of the answer says I should be using the EventManager if I want to listen for window events from a service and not break Angular Universal. That being said, is this answer still true? If so, could someone show me why when I subscribe to the onResize$ Observable logs nothing when the window is resized? import { EventManager } from '@angular/platform-browser'; import { Observable } from 'rxjs/Observable';