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

Fixes bug in Angular 9 where the gauge cannot be initialized #18

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

Tzahi12345
Copy link
Contributor

See #16. Basically, when trying to use this library on Angular 9, the component fails to initialize with the ngOnInit function as it's being called too early. Thankfully, there's an ngAfterViewInit function which fixes the issue with no apparent side effects. This is backwards-compatible as well.

See this SO post for more details.

Let me know if you have any questions regarding this PR! It's been tested on my end as well.

Fixes bug in gauge initialization process where the createChart function was called too early -- this change is backwards-compatible
@Tzahi12345
Copy link
Contributor Author

Upon further investigation, it looks like there's still an error that appears in the console, though the component does load up (whereas before it didn't):

image

Copy link
Owner

@adedayo adedayo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Tzahi12345 for your patch. I have incorporated it.

I have also hopefully fixed the error above in the latest version 2.0.5 which should support Angular 9 and 10. Please let me know if you encounter any further issue.

@adedayo adedayo merged commit a0b51fa into adedayo:master Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants