Open schulzi66 opened 2 years ago
A solution would be to use the isPlatformServer()
from @angular/common to check if the application is running in SSR and if so, not initialize the ResizeObserver
I'm also experiencing this issue when using prerendering.
It looks like this is solved in https://github.com/vdolek/angular-resize-event/pull/62
EDIT: added link to solution PR
When serving an angular application with SSR, the directive breaks the application, due to the following error: ReferenceError: ResizeObserver is not defined
It seems that the error occours in the constructor of the directive.