Angular Resize Observer
npm install ng-resize-observer
The ponyfill https://github.com/juggle/resize-observer is not bundled by default.
To include the bundle, use either
on every component. Or import it once in a module:
Angular does not zone patch resize-observer. Nor does this library. This means that change detection is not triggered in certain async situations. To be safe its recommended to add the zone patch for resize-observer in your polyfill.ts.
Prefer a directive over a observable?
ResizeObserver is still a draft and is not yet finalised and is subject to change.