adding a prototype on vue using nuxt

Solutions on MaxInterview for adding a prototype on vue using nuxt by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "adding a prototype on vue using nuxt"
Romina
27 Oct 2019
1// create in plugins/hello
2export default ({ app }, inject) => {
3  // Inject $hello(msg) in Vue, context and store.
4  inject('hello', msg => console.log(`Hello ${msg}!`))
5}
6
7// add in nuxt.config.js
8export default {
9  plugins: ['~/plugins/hello.js']
10}