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

Trouble configuring this and getting it working #17

Open
richard-edwards opened this issue Feb 18, 2018 · 1 comment
Open

Trouble configuring this and getting it working #17

richard-edwards opened this issue Feb 18, 2018 · 1 comment

Comments

@richard-edwards
Copy link

Hi there,

I've done everything I can to get this to work but I'm not getting anything showing and no errors at all. Do you know of a sample repo where this is being used so I can check my configuration?

Here is what I've done so far:

  1. yarn add vue-nprogress

  2. added import NprogressContainer from "vue-nprogress/src/NprogressContainer"; into my App.vue, referenced it in components and added the <nprogress-container></nprogress-container> into it.

<template>
  <div id="app">
    <nprogress-container></nprogress-container>
  </div>
</template>

<script>
import NprogressContainer from "vue-nprogress/src/NprogressContainer";

export default {
  name: "app",
  components: {
    NprogressContainer
  },
  data() {
    return {
      msg: "Welcome to Your Vue.js App"
    };
  }
};
</script>

<style>
</style>
  1. imported the library into my main.js and configured as below:
import Vue from "vue";
import NProgress from "vue-nprogress";
import App from "./App.vue";

Vue.use(NProgress);

const nprogress = new NProgress({ parent: ".nprogress-container" });

const app = new Vue({
  el: "#app",
  nprogress,
  components: { App },
  template: "<App />"
});

Anything look bad here? I'm sure it's just something small that I'm doing.

@ghost
Copy link

ghost commented Sep 12, 2018

Removing the { parent: ".nprogress-container" } makes it work.
#10 gives more info about this.

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

1 participant