Topic: Notification Pro version leads to error message
Expected behavior
Show notification**
Actual behavior**
Error message: Cannot read property 'info' of undefined
Resources (screenshots, code snippets etc.)
var vm = new Vue({ el: '#form',
components: { mdbInput: mdbvue.mdbInput, mdbSelect: mdbvue.mdbSelect, mdbDatePicker: mdbvue.mdbDatePicker, mdbContainer: mdbvue.mdbContainer, mdbRow: mdbvue.mdbRow, mdbCol: mdbvue.mdbCol, mdbBtn: mdbvue.mdbBtn, mdbIcon: mdbvue.mdbIcon },
...methods:
{ this.$notify.info({ message: 'Hi! I am info message.', position: 'top right', timeOut: 5000 }); }
Magdalena Dembna staff premium answered 5 years ago
First of all, make sure that your code is correct - you can find working examples here: https://mdbootstrap.com/docs/vue/advanced/notifications/ . Make sure that this import is included in your main.js
file - this is, the most likely, the reason for the error message:
import Notify from 'mdbvue/lib/components/Notify'
Vue.use(Notify)
In future tickets, please make use of our formatting tools. Best regards, Magdalena
lgmaxim31 answered 3 years ago
lgmaxim31 answered 3 years ago
Mikołaj Smoleński staff answered 3 years ago
@lgmaxim31 please open a new issue with a detailed explanation of problems.
Keep coding, Mikołaj from MDB
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB Vue
- MDB Version: 6.7.0
- Device: PC
- Browser: Chrome
- OS: Windows 8
- Provided sample code: No
- Provided link: No