Cookies get method doesn'T work
-
Hi I’m new on quasar. I want to use Cookies plugins. I’m trying to use it a follows :
import { Cookies } from 'quasar' const TokenKey = 'userToken' export function getToken () { return Cookies.get(TokenKey) } export function setToken (token) { return Cookies.set(TokenKey, token) } export function removeToken() { return Cookies.remove(TokenKey) }
and my quasar.js file is as follows ;
import { Quasar, Cookies } from 'quasar' Vue.use(Quasar, { config: {}, components: { /* not needed if importStrategy is not 'manual' */ }, directives: { /* not needed if importStrategy is not 'manual' */ }, plugins: { Cookies } })
I got following error… What’s the problem I don’t understand…
“quasar_src_plugins_Cookies_js__WEBPACK_IMPORTED_MODULE_0__.default.get is not a function”
-
So, your intention is to use Quasar as a Vue CLI plugin? This bottom code makes no sense to me.
Scott