No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    v-for to create menu (q-side-link item)

    Help
    4
    5
    1556
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      helpmelearn last edited by

      Can we not do this?

      <div v-for=“page in pages” v-bind:key =“page.key”>
      <q-side-link item to={{page.path}} exact>
      <q-item-main label>{{page.name}}</q-item-main>
      </q-side-link>
      </div>

      I can’t seem to get the page value to use it on the to=.
      I’m probably not doing the key right.

      1 Reply Last reply Reply Quote 0
      • L
        leopiccionia last edited by

        @helpmelearn Vue 2.x doesn’t allow interpolations inside props/attributes. You should use v-bind:to="page.path" or shorthand :to="page.path".

        1 Reply Last reply Reply Quote 2
        • N
          ninafar last edited by

          hi .im having almost the same problem

          <q-item-main v-for=“link in links” v-bind:key=“link.x” v-bind:to=“link.url” exact>{{ link.title }}</q-item-main>

          the link is not clickable.pls help

          1 Reply Last reply Reply Quote 0
          • C
            chbarr last edited by

            a jsfiddle exampl with quasar layout and vue-router:
            https://jsfiddle.net/ypL7nLrh/30/

            1 Reply Last reply Reply Quote 0
            • N
              ninafar last edited by

              thanks! . it works fine now

              1 Reply Last reply Reply Quote 0
              • First post
                Last post