Answers for "adding a prototype on vue using nuxt"

1

adding a prototype on vue using nuxt

// create in plugins/hello
export default ({ app }, inject) => {
  // Inject $hello(msg) in Vue, context and store.
  inject('hello', msg => console.log(`Hello ${msg}!`))
}

// add in nuxt.config.js
export default {
  plugins: ['~/plugins/hello.js']
}
Posted by: Guest on December-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language