-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: google-maps
Description
Reproduction
The error is reproducible here https://stackblitz.com/edit/components-issue-8f7l3p?file=src%2Fapp%2Fexample-component.ts, just check the console.
DynamicFormQuestionComponent.html:72 ERROR ReferenceError: google is not defined
at new MapGeocoder (google-maps.js:3032)
at createClass (core.js:21148)
at _createProviderInstance$1 (core.js:21133)
at createProviderInstance (core.js:21010)
at createViewNodes (core.js:29374)
at createEmbeddedView (core.js:29295)
at callWithDebugContext (core.js:30309)
at Object.debugCreateEmbeddedView [as createEmbeddedView] (core.js:29833)
at TemplateRef_.push../node_modules/@angular/core/fesm5/core.js.TemplateRef_.createEmbeddedView (core.js:20742)
at ViewContainerRef_.push../node_modules/@angular/core/fesm5/core.js.ViewContainerRef_.createEmbeddedView (core.js:20608)
Steps to reproduce:
- Lazy Load the API
- Import the
MapGeocoder
provider - Load the provider in a component
- Inject the provider in the
constructor
Expected Behavior
Load the provider without the error
ERROR ReferenceError: google is not defined
Actual Behavior
An error is logged in the Chrome DevTools console.
Environment
- Angular: 11.2.4
- CDK/Material: 11.2.3
- Browser(s): Chrome
- Operating System: Windows 10:
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: google-maps