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

    How to change title in quasar-toolbar-title?

    Help
    2
    2
    3224
    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.
    • P
      perriert last edited by

      Basically I’d like to change the title of the screen in the quasar-toolbar-title when user selects an other function from the menu. So I have a menu.vue which contains a drawer, a title and menu options in the drawer. Selecting an option triggers a child route in the router.js which then loads the needed component into a router-view also declared in menu.vue.

      How can I change the title when each of the vue components have loaded?

      I have tried with LocalStorage and now with Events without success. If I have changed the value in the localstorage the variable din’t changed as well so binding was not working as I expected. Then I have tried watching for a change-title event and fire it from the vuew components but now I can’t fire them. Shouldn’t the ready() method be called when the vue component rendered?

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

        Hi,

        First of all, we’re using Vue 2, so ‘ready()’ has been replaced by ‘mounted()’. Make sure you check this: https://vuejs.org/v2/guide/instance.html#Lifecycle-Diagram

        Then, for communicating between components: http://quasar-framework.org/guide/components-sharing-state.html
        Long story short: use a store like described in the link or Vuex. Spoiler alert: you’ll need some time to understand how things work.

        Cheers,
        Razvan

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