Brynn Bateman
Brynn Bateman

Reputation: 769

Can I include a Vue directive inside my .vue file when using vueify?

When using the vueify package, is there a way I can include a directive inside my SomeComponent.vue file? It's a directive used only for that component. I tried including it inside the script tags outside the export default { ... } but it doesn't seem to work.

Am I stuck having all the directives in my main app.js file where I create the Vue instance?

Upvotes: 0

Views: 2433

Answers (1)

Brynn Bateman
Brynn Bateman

Reputation: 769

The docs show that you can include local directives using the directives option. I tried that and it worked fine.

Upvotes: 1

Related Questions