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

    Navigation guard - tell how a route was arrived at

    Framework
    2
    4
    121
    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.
    • W
      walfin last edited by

      Hi, does anyone know if there’s a way to distinguish in beforeRouteUpdate between a route which was arrived at through a router-link (or router.push) and a router.back (or hitting the android back button)?

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

        @walfin

        does not seem possible with soly beforeRouteUpdate , but you could store a value in for example vuex before you execute: router.push, router.back, ect.

        Then you’ll get something like this in the vuex:
        state: { routeMethod: “router.push”} ,

        W 1 Reply Last reply Reply Quote 0
        • W
          walfin @dobbel last edited by

          @dobbel But that means I can’t just use the “to” attribute for list items, I have to manually create handlers for each menu item which calls this.$store.commit(…) and then this.$router.push(…), is that right?

          dobbel 1 Reply Last reply Reply Quote 0
          • dobbel
            dobbel @walfin last edited by

            @walfin

            correct.

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