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

    router is not working in boot files

    CLI
    2
    2
    382
    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.
    • C
      Christal last edited by

      I have below code in my boot/axios.js

      import Vue from 'vue'
      import axios from 'axios'
      import { Cookies } from 'quasar'
      import router from '../router/routes.js'
      
      export async function axioinstance (data) {
        router.push('/12312')
      }
      

      router.push does not work. May I know if I am missing anything?

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Read this carfully please. 🙂

        https://quasar.dev/quasar-cli/cli-documentation/boot-files#Anatomy-of-a-boot-file

        Scott

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