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
    1. Home
    2. jtktam
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Best 0
    • Groups 0

    jtktam

    @jtktam

    0
    Reputation
    130
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    jtktam Follow

    Latest posts made by jtktam

    • RE: Use Plugin inside Vuex module action

      @steve said in Use Plugin inside Vuex module action:

      Thanks @benoitranque for this tid bit: http://forum.quasar-framework.org/topic/1898/services-and-axios-plugin

      In order to use axios without passing in ‘this’ in the vuex store actions, you can do this:

      import Vue from 'vue'
      
      export const AUTH_REQUEST = ({ commit, dispatch }, creds) => {
        return new Promise((resolve, reject) => {
          Vue.prototype.$axios({ .... })
       }
      })
      

      I was scratching my head when I was writing some common library code to access this.$axios from my static plain javascript libs

      this tip saved me having to pass in this or this.$axios … thanks!

      posted in Help
      J
      jtktam