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

    variable in asset

    Framework
    2
    3
    129
    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.
    • matroskin
      matroskin last edited by

      Hi,
      how can I use vars in assets path?

      <img src="~assets/img.png" />
      

      is ok
      but

      <img :src="'~assets/img' + id + '.png'" />
      

      doesn’t work…
      img src is ~assets/img5.png now

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        Have you tried <img :src="require('assets/img' + id + '.png')" /> ?

        1 Reply Last reply Reply Quote 1
        • matroskin
          matroskin last edited by

          It works, thanks

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