Skip to content

[help] component inside geojson #75

@RemiDesgrange

Description

@RemiDesgrange

Hi,

Let's use the example geojson component.

Now, let's say that I want, for each geometry to bind a popup. Easy, in options I put a onEachFeature and place a bindPopup

options: {
  onEachFeature (f. l) {
    l.bindPopup(f.properties.nom)
 }
}

Now is the tricky part : how can I add a component to this popup and even better, a router-link ? It really look like a dynamic component injection... It seems that this is not the right way to do things in vue.js (https://forum-archive.vuejs.org/topic/349/injecting-components-to-the-dom/2) but I can't figure out how to do it.

In advance thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions