vue-navigation-bar icon indicating copy to clipboard operation
vue-navigation-bar copied to clipboard

router links with parameters

Open haydentrail opened this issue 3 years ago • 1 comments

I am dynamically creating a dropdown menu and need to have params passed to the router-link.

Ive found in DynamicLink.vue the following code:

    return h(
      "router-link",
      { props: { to: { name: this.path.name } } },
      this.$slots.default
    );

This could accomodate params with:

    return h(
      "router-link",
      { props: { to: this.path } },
      this.$slots.default
    );

Then we could define the params like

path:{name:"this-route",params:{item:thisItem}

Forgive me if there another predefined way of doing this with vue-navigation-bar, I couldn't find one.

haydentrail avatar Jun 04 '21 22:06 haydentrail

I think this is a good idea and I think you're right with your suggestion. Would you mind putting up a PR and confirming it works? If you don't have the time let me know - I'll get it in.

johndatserakis avatar Sep 05 '21 03:09 johndatserakis