ngx-lite icon indicating copy to clipboard operation
ngx-lite copied to clipboard

Use Intersection Observer API for in-viewport module

Open xmlking opened this issue 6 years ago • 2 comments

Is your feature request related to a problem? Please describe.

use Intersection Observer API like

https://github.com/TradeMe/ng-defer-load

for in-viewport module

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered use Intersection Observer API to check if an element is in viewport and falls back to scroll detection mechanism for unsupported browsers.

Additional context Add any other context or screenshots about the feature request here.

xmlking avatar Nov 22 '18 09:11 xmlking

Agree this would be a great improvement!

coryrylan avatar Nov 29 '18 16:11 coryrylan

here is my initial implementation https://github.com/xmlking/ngx-starter-kit/tree/develop/libs/ngx-utils/src/lib/directives/in-viewport

demo https://xmlking.github.io/ngx-starter-kit/dashboard/experiments/viewport

xmlking avatar Dec 02 '18 12:12 xmlking