rstacruz / nprogress

For slim progress bars like on YouTube, Medium, etc
http://ricostacruz.com/nprogress
MIT License
25.99k stars 1.81k forks source link

It is recommended to increase the failure style #177

Open maxid opened 7 years ago

maxid commented 7 years ago

It is recommended to increase the failure style NProgress.failure() or NProgress.error()

jwenjian commented 7 years ago

+1

HassanDomeDenea commented 4 years ago

An idea to do this by changing the css background property when there is failure. This is an example using axios (and Jquery selector): `

// before a response is returned stop nprogress axios.interceptors.response.use(response => { NProgress.done(); return response }, error => { $('#nprogress .bar').css('background', 'red'); NProgress.done(); return error });

`