-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use snotify in js files #63
Comments
You can use Vue eventBus. In vue component you can use snotify as you want. |
For the impatient, I see two more options:
|
Hey, sorry for the late reply. @nros using it directly works like a charm, thanks! |
Hey
I'm using vue-element-admin in my project. It has an util dir with request.js file in it to make http request easier:
There is a file (
main.js
) at the source root that import snotify and it works for the rest of the app.But I want to notify the user if the REST endpoint is down, this means I have to use snotify in request.js
I tried to use snotify importing Vue object:
but $snotify is undefined
I tried to create a js file (utils/notifier.js):
importing it in request.js, but with the same result
Could you please tell me how to do?
The text was updated successfully, but these errors were encountered: