R
R
Roman Rakzin2022-02-09 20:25:05
Angular
Roman Rakzin, 2022-02-09 20:25:05

How to work with viewPort in Angular and load an image when scrolling to it?

How can I make the image load only when the viewport is next to it?
How to configure it to download a little earlier than the scope reaches it - how to implement this in Angular?
Is it possible to create a component that would accept data-src and substitute the value of src when the scope is next to it? (it is desirable to slightly shift, so that a person would not see the moment the picture is loading, but make an offset of several tens of pixels).
How to implement this in Angular?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question