Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Please support SSR -> ERROR { TypeError: this.el.addEventListener is not a function at ImgFallbackDirective.addEvents #19

Closed
AnthonyNahas opened this issue Sep 13, 2017 · 1 comment
Assignees
Milestone

Comments

@AnthonyNahas
Copy link

i am using angular universal app which will be rendered on the server side with nodejs.
Since in the nodejs environment there is objects like window... document and more, the platform will not recognize the addEventListener as function.

-->

ERROR { TypeError: this.el.addEventListener is not a function at ImgFallbackDirective.addEvents (/Users/../node_modules/ngx-img-fallback/dist/src/ngx-img-fallback.directive.js:36:17) __zone_symbol__currentTask: ZoneTask { _zone: Zone { _properties: [Object], _parent: [Object], _name: 'angular', _zoneDelegate: [Object] }, runCount: 0, _zoneDelegates: null, _state: 'notScheduled', type: 'microTask', source: 'Promise.then', data: undefined, scheduleFn: undefined, cancelFn: null, callback: [Function], invoke: [Function] } }

solution: maybe a fallback strategy for server side rendering will be great !!!

Thank you

@VadimDez VadimDez self-assigned this Sep 13, 2017
@VadimDez VadimDez added this to the 1.2.0 milestone Sep 13, 2017
VadimDez added a commit that referenced this issue Sep 13, 2017
@AnthonyNahas
Copy link
Author

it works thank u

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants