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

ViewChild instance of NgMapsViewComponent is undefined #108

Closed
piyushgoyal25 opened this issue Feb 17, 2023 · 2 comments
Closed

ViewChild instance of NgMapsViewComponent is undefined #108

piyushgoyal25 opened this issue Feb 17, 2023 · 2 comments

Comments

@piyushgoyal25
Copy link

I am trying to access NgMapsViewComponent via ViewChild in my app and the instance always comes as undefined.

`@ViewChild(NgMapsViewComponent) public ngMap: NgMapsViewComponent;

this.ngMap.triggerResize();
`

Uncaught TypeError: Cannot read properties of undefined (reading 'triggerResize')

@DaSchTour
Copy link
Contributor

When using google maps you probably have to use GoogleComponent as it extends the NgMapsViewComponent and is used as the wrapper in google context.

@piyushgoyal25
Copy link
Author

When using google maps you probably have to use GoogleComponent as it extends the NgMapsViewComponent and is used as the wrapper in google context.

Thank you. That worked.

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

No branches or pull requests

2 participants