Skip to content
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

Delay between constructor and ngoninit #15503

Closed
Atikant opened this issue Jan 23, 2024 · 1 comment
Closed

Delay between constructor and ngoninit #15503

Atikant opened this issue Jan 23, 2024 · 1 comment
Labels

Comments

@Atikant
Copy link

Atikant commented Jan 23, 2024

I am using open layer version 4.6.17 and angular version 14. I have a click listener from the map which reads the feature being clicked and after getting the feature extracts the ID of the feature and routes to a component. The issue is the call reaches the called component immediately but there is a delay of 4-10 seconds going to the onInit function of the component. If in the constructor I add NGZone and ChangeDetectorRef and set a timeout for to detect changes the issue vanishes.
I do not understand what is the root cause of this.

@Atikant Atikant added the bug label Jan 23, 2024
@Atikant
Copy link
Author

Atikant commented Jan 23, 2024

I had Map running outside angular so angular wasn't able to detect changes with in the Map

@Atikant Atikant closed this as completed Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant