-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
inViewportAction seems to run outside of NgZone #1284
Comments
I think that it would be not optimal to run changes detection whenever something changes it's visibility. Especially when you have many elements that are tracked. So to have best performance I think that change detection should be run based of a results from |
I'm not an expert in NgZone and change detection. I assumed based on issue #176, that it was the intention for the My use case isn't about change detection, but about dispatching an action to NGRX inside of NgZone, as described here: https://ngrx.io/guide/store/configuration/runtime-checks#strictactionwithinngzone. I can always fix this at my end by calling |
@all-contributors please add @karptonite for bug |
I've put up a pull request to add @karptonite! 🎉 |
Thanks! As I mentioned, this might be a negative for performance, and it might be better to either ask people to handle the events with NgZone themselves, or add an option to take it out of NgZone, as requested in #176. I'm not sure, honestly, but this should restore the previous behavior for my use case, anyway! |
The library should not expect Angular users to use advanced strategies and should work with the framework's defaults. It was also a nice way of testing automatic releasing. |
This appears to be a regression in 15.0 from 13.0.1, although I haven't eliminated the possibility that it is something that I'm doing wrong.
I have code that looks like this:
and in the component:
With version 13.0.1,
isInAngularZone()
reports astrue
, and with version 15.0, it reports asfalse
.I'm doing stuff in the
loadOnIntersection
function that expects to be run in zone. I can explicitly do this, but I think the intention is thatinViewportAction
should be in zone as well.The text was updated successfully, but these errors were encountered: