vue-js-toggle-button icon indicating copy to clipboard operation
vue-js-toggle-button copied to clipboard

How can i use this with the cdn inside the simple Html website?

Open usamamashkoor opened this issue 5 years ago • 4 comments
trafficstars

Hi, I want to add this inside my simple HTML website using CDN, how can I do that I can not seem to find any CDN URL.

Kindly let me know.

Thanks

usamamashkoor avatar Jun 04 '20 13:06 usamamashkoor

This is page with a cdn url https://www.jsdelivr.com/package/npm/vue-js-toggle-button?tab=collection but not sure how to import and Vue.use(ToggleButton) it?

abulka avatar Jun 15 '20 09:06 abulka

Also wondering how to use the Component in a simple HTML page. I don't have the ability 'import' due to the software I'm integrating with. With the BootstrapVue components they "just work" as long as I reference the js/css URLs, but this one I can't figure out how to render the components.

trush44 avatar Jun 17 '20 18:06 trush44

@usamamashkoor you can do it like this:

<head>
   ... your other scripts here ...
   <script src="//cdn.jsdelivr.net/npm/[email protected]"></script>
</head>

And then before you construct your Vue application, add this:

window['vue-js-toggle-button'].default.install(Vue);

joelnordell avatar Sep 25 '20 20:09 joelnordell

... or you can use this call

Vue.use(window['vue-js-toggle-button'].default)

djdance avatar Jul 22 '22 14:07 djdance