Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
usamamashkoor opened this issue Jun 4, 2020 · 4 comments
Open

Comments

@usamamashkoor
Copy link

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

@abulka
Copy link

abulka commented Jun 15, 2020

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?

@trush44
Copy link

trush44 commented Jun 17, 2020

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.

@joelnordell
Copy link

@usamamashkoor you can do it like this:

<head>
   ... your other scripts here ...
   <script src="//cdn.jsdelivr.net/npm/vue-js-toggle-button@1.3.3"></script>
</head>

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

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

@djdance
Copy link

djdance commented Jul 22, 2022

... or you can use this call

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants