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

Use as CDN #12

Closed
amchconsult opened this issue Apr 16, 2022 · 2 comments
Closed

Use as CDN #12

amchconsult opened this issue Apr 16, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@amchconsult
Copy link

Hi
Can you give me an example using as CDN?
Do you add as vue.use or vue.component?
thank you

@HELMAB HELMAB added the help wanted Extra attention is needed label Apr 16, 2022
@HELMAB
Copy link
Owner

HELMAB commented Apr 16, 2022

Hello @amchconsult, you can try with jsfiddle or the following below

<div id="app">
  <h3>{{ message }}</h3>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="https://unpkg.com/vuejs-loading-screen@1.10.2/dist/vuejs-loading-screen.min.js"></script>

<script>
  // Register the plugin
  Vue.use(VuejsLoadingScreen);

  // Create a new Vue instance
  const app = new Vue({
    el: '#app',
    data() {
      return {
        message: 'Hello Vue!',
      }
    },
    mounted() {
      this.$isLoading(true)
    }
  })
</script>

@amchconsult
Copy link
Author

thank you, it works great

@HELMAB HELMAB closed this as completed Apr 17, 2022
@HELMAB HELMAB pinned this issue Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants