You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description
When I try injecting GoogleMapsAPIWrapper into one of my components, I have to provide the Wrapper either to my NgModule or my NgComponent. This doesn't seem like expected behavior.
If this is an Angular 4 service, you should be able to just import AgmCoreModule and not have to use the providers array in your module.
Steps to reproduce and a minimal demo of the problem
The GoogleMapsAPIWraper gets created when a agm-map instance gets created. This is fully intentional. We maintain one instance per map. If you want to get the instance of the map, you can create a custom component and inject the GoogleMapsAPIWrapper via the constructor. So I'm closing this.
Issue description
When I try injecting GoogleMapsAPIWrapper into one of my components, I have to provide the Wrapper either to my NgModule or my NgComponent. This doesn't seem like expected behavior.
If this is an Angular 4 service, you should be able to just import AgmCoreModule and not have to use the providers array in your module.
Steps to reproduce and a minimal demo of the problem
The above gives an error.
You need to change to
providers: [ GoogleMapsAPIWrapper ], bootstrap: [AppComponent]
Expected/desired behavior
You shouldn't have to provide
GoogleMapsAPIWrapper
to your Module.angular2 & angular-google-maps version
angular: 4.1.3
agm/core: 1.0.0-beta.0
Other information
The text was updated successfully, but these errors were encountered: