Failed to resolve directive
-
Hi!
I’m trying to create a custom directive and for some reason is failing.
I’ve have the intuition that should be done as plugins I didn’t succeed.
export default ({ Vue }) => { Vue.directive('capde', { bind: function (el, binding, vnode) { console.log('ELEMENT', binding) } }) }
<section v-elemlog class="full-screen full-height">...
-
If your custom directive is called ‘capde’, you should use it like this:
<section v-capde></section>
-
This post is deleted! -
I’ve solved:
Sorry the above was just another attemp. Yes it works withv-whatever-directive
. @ouaR’s right! thanks!But real issue was because Quasar treates anything outsider kind of like a plugin. So:
1- In quasar.conf.js file, go to plugins (make sure is not in framework.plugins array)
2- add there your directive’s filename. NOT the directive’s name
Done