w11k / angular-sticky-things

Sticky Directive for Angular 2+

Home Page:https://w11k.github.io/angular-sticky-things

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read property 'addEventListener' of null.

aspramsh opened this issue · comments

When I add this
stickyThing="" [scrollContainer]="'.scroll-container'"
I get the following error:

ERROR TypeError: Cannot read property 'addEventListener' of null.

Could someone help please?
After adding this to .ts file

@HostBinding('class') class = 'scroll-container'
I get this error:

ERROR DOMException: Failed to execute 'querySelector' on 'Document': ''.scroll-container'' is not a valid selector.
at StickyThingDirective.getScrollTarget

@aspramsh does this error still exist?