quasar icon indicating copy to clipboard operation
quasar copied to clipboard

this.$q.notify (Quasar Notify Plugin) not available in main App Vue instance

Open kevinmarrec opened this issue 8 years ago • 4 comments

Software version

Quasar: 0.15.8 OS: Windows 10 Node: 9.8.0 NPM: 5.6.0 Browsers: Chrome

The Error

TypeError: this.$q.notify is not a function

What I was expecting

A Notification with the message Test should be displayed without errors

Steps to reproduce

Having this following code in App.vue file

<template>
  <div id="q-app">
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  created () {
    this.$q.notify('Test')
  }
}
</script>

kevinmarrec avatar Mar 18 '18 16:03 kevinmarrec

Available in 0.15.9

rstoenescu avatar Mar 18 '18 16:03 rstoenescu

I have the same issue with Quasar 0.15.10

I import Quasar this way import Quasar from 'quasar-framework/dist/quasar.mat.esm'

But notify is not in this.$q

mesiora avatar Apr 20 '18 11:04 mesiora

@khom-outsourcify why are you importing Quasar like that? Use Quasar's starter kit instead. Look for guidance on Discord if you need to.

rstoenescu avatar Apr 21 '18 08:04 rstoenescu

@rstoenescu Sorry my English is limited, I use Symfony with API platform and Vue.JS + Quasar framework + webpack(encore) for frontend.

Do you have a best way to importing Quasar ?

mesiora avatar Apr 22 '18 06:04 mesiora