Topic: mdbvue notifications do not exist

frederick valone free asked 5 years ago


I downloaded the most recent mdbvue pro package and tried implementing the notifications as shown on the notifications API guide directly in the cloned repository project. 

for one thing there is no npm package dependency in the package.json file it is using the mdbvue directory for its mdbvue imports for the other pro components I've been working on  but the index.js file that is exporting all the other components.

The simple code is below but it does not work. Why do you not have a simple locked down npm package for mdbvue pro users so that we are not always running into issues with building for real world enterprise production apps?

import Notify from 'mdbvue';

Vue.use(Notify);

Jakub Strebeyko staff answered 5 years ago


Hi there @frederick valone,

Note: there is no import statement in our docs, because, thanks to the two lines you pasted, Notifications are implemented as a Vue plugin and not a standalone component within the app. It is done so that you should be able to use the Vue instance this.$notify() method from anywhere in your project with no need to explicitly import it anywhere except for main.js.

Where are you downloading the package from exactly? I would like to retrace your steps and see what's up - is it the demo app or the actual repo?  Second question: in what way is not working? What is the transpiler / console output you are getting? Are you perhaps unable to call the method? 

Finally, could you specify what you mean by "locked down npm pro package"? Obviously, we are ready to work hard to accommodate all the users, working on both small and big projects. 

Thanks!

With best regards,
Kuba


frederickvalone free commented 5 years ago

So how would I add the plugin to a current vue app that is currently using the mdbvue free version?


Mikołaj Smoleński staff commented 5 years ago

Hi there,

Please try to import Notify plugin in Your main.js like this: 

import Notify from 'mdbvue/src/components/pro/Notify.js';
Vue.use(Notify);
 
Please let us know if it work ok now. 
 
Best regards

Tenarius free commented 5 years ago

For me works: import Notify from 'mdbvue/src/components/pro/Advanced/Notify.js'; Vue.use(Notify);



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 4.8.2
  • Device: pc
  • Browser: chrome
  • OS: win 10
  • Provided sample code: No
  • Provided link: No