Does not work with Perfect Scrollbar plugin.
See original GitHub issueHi When page is first loaded the images are downloaded but when I scroll down the images are not downloading. Seems like event is not firing.
<div class="content d-flex flex-wrap" style="position: relative">
<div class="brick" *ngFor="let employee of employees">
<div class="employeeBox animated zoomIn " [routerLink]="['/employees', employee.id]">
<div class="employeePhoto">
<img [defaultImage]="'assets/icons/user.svg'" [lazyLoad]="employee.imgUrl">
</div>
<div class="employeeInfo">
<p>{{employee.name}}</p>
</div>
</div>
</div>
</div>
</div>
Angular version: 5.1.2 “ng-lazyload-image”: “^3.4.2”, Hope you solve problem. Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Perfect Scrollbar
Minimalistic but perfect custom scrollbar plugin. Create scrollbar without manipulation on DOM tree, any change on the design layout, and much more.
Read more >perfect-scrollbar not work - Stack Overflow
i have a list of items inside a ul, wrapped on a div, i am using this plugin: http ...
Read more >perfect scrollbar doesnt work in a div with sidenav
I added a perfectscrollbar in a div. But sidenav doesnt work now. Can u fix it? And scrollbar design is not good. İt...
Read more >perfect-scrollbar - npm
Minimalistic but perfect custom scrollbar plugin. Latest version: 1.5.5, last published: a year ago. Start using perfect-scrollbar in your ...
Read more >Tiny JavaScript Plugin For Beautifying Scrollbar - jQuery Script
perfect -scrollbar is a lightweight JavaScript plugin that allows you to ... 28, // When set to true, the scroll bar in X...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I managed to get it to work like this - https://stackblitz.com/edit/angular-zovu45 I’m not sure if that’s the best solution though.
It’s also possible to solve it like @tjoskar suggested in https://github.com/tjoskar/ng-lazyload-image/issues/275#issuecomment-356853681, but you’d have to use perfect-scrollbar as a directive instead of a component for it to work (https://github.com/zefoy/ngx-perfect-scrollbar#installing-and-usage under DIRECTIVE USAGE).
@sapierens @tjoskar. Thanks. Solved the issue by adding Scroll Target. But the plugin is not compatible with perfect scrollbar. in TS
this.scroll = document.getElementById('main_content');
Changed perfect scrollbar to div with overflow auto and it works as expected but I want to keep perfect scrollbar. So what I did is: When I console this.scroll
So by assigning this.scroll to document.getElementById(‘main_content’).children[0]; Problem is fully solved. Thanks for help.