Vue-js-modal: How to use directly in browser using plain javascript?

Created on 7 Nov 2018  路  2Comments  路  Source: euvl/vue-js-modal

Question, how can I use this using plain-old javascript in a web browser?

The "vue-resource" extension for example includes a handy bit of logic to automatically register itself:

if (typeof window !== 'undefined' && window.Vue) {
  window.Vue.use(plugin);
}

vue-js-model doesn't include any such logic, so just wondering how I actually use in a web browser where import/require aren't available.

Thanks

Most helpful comment

Just found this little snippet in the README which did the trick:

Vue.use(window["vue-js-modal"].default);

All 2 comments

Just found this little snippet in the README which did the trick:

Vue.use(window["vue-js-modal"].default);

This should be mentioned in the Usage in the README.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Max64 picture Max64  路  4Comments

whaoran picture whaoran  路  3Comments

songoo picture songoo  路  4Comments

at0g picture at0g  路  3Comments

bicstone picture bicstone  路  4Comments