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

agm-snazzy-info-window error on rendering #1170

Closed
Halynsky opened this issue Sep 25, 2017 · 3 comments
Closed

agm-snazzy-info-window error on rendering #1170

Halynsky opened this issue Sep 25, 2017 · 3 comments
Labels

Comments

@Halynsky
Copy link

Issue description
I am trying to use agm-snazzy-info-window without marker but getting error on rendering of this window
here is code:

<div *ngIf="selectedMarker" >
    <agm-snazzy-info-window 
         [latitude]="selectedMarker.latitude" 
         [longitude]="selectedMarker.longitude"
         [isOpen]="true">
      {{selectedMarker.id}}
    </agm-snazzy-info-window>
</div>

What steps should we try in your demo to see the problem?

add agm-snazzy-info-window ui component, set input parameter [isOpen]="true"

Current behavior

error in console:

core.es5.js:1020 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'createEmbeddedView' of undefined TypeError: Cannot read property 'createEmbeddedView' of undefined at ViewContainerRef_.webpackJsonp.../../../core/@angular/core.es5.js.ViewContainerRef_.createEmbeddedView (core.es5.js:10056) at AgmSnazzyInfoWindow.webpackJsonp.../../../../@agm/snazzy-info-window/directives/snazzy-info-window.js.AgmSnazzyInfoWindow._createViewContent (snazzy-info-window.js:154) at snazzy-info-window.js:140 at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:392) at Object.onInvoke (core.es5.js:3890) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391) at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run (zone.js:142) at zone.js:844 at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425) at Object.onInvokeTask (core.es5.js:3881) at ViewContainerRef_.webpackJsonp.../../../core/@angular/core.es5.js.ViewContainerRef_.createEmbeddedView (core.es5.js:10056) at AgmSnazzyInfoWindow.webpackJsonp.../../../../@agm/snazzy-info-window/directives/snazzy-info-window.js.AgmSnazzyInfoWindow._createViewContent (snazzy-info-window.js:154) at snazzy-info-window.js:140 at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:392) at Object.onInvoke (core.es5.js:3890) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391) at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run (zone.js:142) at zone.js:844 at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425) at Object.onInvokeTask (core.es5.js:3881) at resolvePromise (zone.js:795) at zone.js:847 at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425) at Object.onInvokeTask (core.es5.js:3881) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424) at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:192) at drainMicroTaskQueue (zone.js:602) at <anonymous>

angular2 & angular-google-maps version

    "agm/core": "1.0.0-beta.1",
    "agm/snazzy-info-window": "1.0.0-beta.1",
    "snazzy-info-window": "1.1.0",

Other information

Interesting think that when I remove parameter [isOpen] from template the error disappear.

@rojasjandro89
Copy link

Same here...

@viktorstaikov
Copy link

Had the same problem. After checking the docs here
https://angular-maps.com/guides/snazzy-info-window/custom-info-windows-with-snazzy-info-window/ I've noticed that you need to have <ng-template> wrapping the content of <agm-snazzy-info-window> in order to work.
And it worked :)

@stale
Copy link

stale bot commented Nov 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2018
@stale stale bot closed this as completed Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants