Creating an Angular 2 Lazy Loader
Joey F. Poon

I got the following errors:

  • error TS2339: Property ‘element’ does not exist on type ‘MyLazyLoaderDirective’.

Should I remove “this.” from -> if (this.element.scrollTop > this.element.scrollHeight * 0.75) ?

  • inline template:21:5 caused by: Cannot read property ‘slice’ of undefined

Both this.displayData and this.sourceData Are undefined before the .slice() and .splice() methods.

Show your support

Clapping shows how much you appreciated Mat Ghp’s story.