-
Notifications
You must be signed in to change notification settings - Fork 83
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
jsvectormap does not work in Angular #75
Comments
smoelker
added a commit
to smoelker/jsvectormap
that referenced
this issue
Mar 22, 2022
themustafaomar
pushed a commit
that referenced
this issue
Mar 23, 2022
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Loading jsvectormap in an Angular component does not work. The proper way to get a reference to the container element is to use the
@ViewChild
annotation and then load the map onngAfterViewInit
. Doing so causes a stack overflow (InternalError: too much recursion
).Steps to reproduce:
package.json
app.component.html
app.component.ts
Error in FireFox:
Error in Chrome:
The error happens when merging the map's options. Specifically when iterating over the properties of the
selector
property which is, in this case, a HTMLDivElement. I suspect that the infinite recursion is due to the hierarchical nature of the DOM element (the DOM element holds a reference to it's parent and children which, in turn, hold a reference to their parent and children).A solution would be to not merge the properties of DOM elements.
The text was updated successfully, but these errors were encountered: