New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add defer viewport and hover triggers #51874
Conversation
Adds support for `on hover` and `prefetch on hover` triggers. Some code had to be moved around so it could be reused from the `on interaction` triggers.
Adds support for `on viewport` and `prefetch on viewport` triggers which will load the deferred content when the element comes into the view.
} | ||
|
||
/** Keeps track of the registered `viewport` triggers. */ | ||
class DeferIntersectionManager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to keep the injectable for the viewport triggers, because the state ended up leaking between tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 👍 Nice work with IntersectionObserver
APIs!
This PR was merged into the repository by commit 16f5fc4. |
Adds support for `on viewport` and `prefetch on viewport` triggers which will load the deferred content when the element comes into the view. PR Close #51874
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds support for `on hover` and `prefetch on hover` triggers. Some code had to be moved around so it could be reused from the `on interaction` triggers. PR Close angular#51874
Adds support for `on viewport` and `prefetch on viewport` triggers which will load the deferred content when the element comes into the view. PR Close angular#51874
Adds the implementations for the
on viewport
andon hover
triggers indefer
blocks. Includes the following commits:feat(core): support deferred hover triggers
Adds support for
on hover
andprefetch on hover
triggers. Some code had to be moved around so it could be reused from theon interaction
triggers.feat(core): support deferred viewport triggers
Adds support for
on viewport
andprefetch on viewport
triggers which will load the deferred content when the element comes into the view.