Static GitHub Issues

[1554] Inject plugin in $root state & context

prev: Velocity.js render function or template not defined in component: anonymous
next: extendRoutes not working

I was try to write and inject horizon.io plugin in the $root (app) with documented way:

export default ({ app, store }) => {
  app.$horizon = horizon
}

but something was wrong and the injected props will append into $store key:

image

As you can see, $horizon will added into $store -> $store.$horizon, and into $store.app -> $store.app.$horizon.

If I test like firebase example, the result will be the same: image

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1386">#c1386</a>)</em></sub></div>