rikmms / progress-bar-4-axios

Slim progress bar (NProgress) for Web applications that use Axios library for HTTP requests
MIT License
246 stars 32 forks source link

NProgress.config() doesn't seem to configure properly #12

Closed jndietz closed 5 years ago

jndietz commented 5 years ago

Everything seems fairly straightforward... Here is how I am instantiating the progress bar in my index.js...

import { loadProgressBar } from 'axios-progress-bar'
const progressBarConfig = NProgress.configure({ parent: '#axios-progress-bar', showSpinner: false });
loadProgressBar(progressBarConfig);

I would have expected to see the progress bar attached to the top of my <div id="axios-progress-bar></div> element, and the spinner is hidden. Is this not the right usage? The spinner still shows and the progress bar is still stuck to the very top of the page.

I've also tried...

import { loadProgressBar } from 'axios-progress-bar'
const progressBarConfig = { parent: '#axios-progress-bar', showSpinner: false };
loadProgressBar(progressBarConfig);