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

    Dynamic q-toolbar - what's the best idea? (0.15)

    Help
    3
    4
    1268
    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.
    • L
      luchman last edited by

      Hi, is there a standard or best way to make dynamically changing q-toolbar according to pages being displayed? This is for Quasar v0.15. Obviously I’m newbie 🙂

      TQ

      1 Reply Last reply Reply Quote 0
      • A
        Alinex last edited by

        Within the routes you may add some meta data like:

          { path: 'test/public',
            component: () => import('pages/test/public'),
            meta: { title: 'Public Test Page' } },
        

        Within the layout or page you can then use this meta data like:

            <q-toolbar-title>
              {{ $route.meta.title }}
            </q-toolbar-title>
        

        So if the route changes, the title will also change.

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

          How about things like back button, menu icon and other stuff like search field…

          1 Reply Last reply Reply Quote 0
          • a47ae
            a47ae last edited by

            You can access the route object from within your component with this.$route
            Then you can use this to display stuff depending on your route

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